Questions about the "Orbital" layer.

Everything about mods can be found here.

Moderator: Morax

Questions about the "Orbital" layer.

Postby Tanksy » 19 Jan 2017, 03:16

Does it even exist?

"BuildOnLayerCaps" inside unit blueprints lists the entry "LAYER_Orbit", but this seems to do nothing but indicate to the game what layer the unit has been built on(?) and nothing else. I'd like to know if there's some possible way of setting a unit up to be on this "Orbit" layer, targetable only by other units that are either on the same layer or allowed to target this layer.

Currently I've tried setting an air unit's elevation to around 75 (really high up.), setting them a unique Category of "ORBITAL", and set the "TargetRestrictOnlyAllow" field of its weapons to "ORBITAL". The unit cannot target anything but other units with the "ORBITAL" category, but my issue now is getting other units to follow this rule. I don't want to itterate through every blueprint, find the weapons category and disallow "ORBITAL" category targets -- There must be some easier way to it.
Tanksy
Avatar-of-War
 
Posts: 75
Joined: 31 Aug 2016, 11:39
Has liked: 1 time
Been liked: 14 times

Re: Questions about the "Orbital" layer.

Postby Sprouto » 19 Jan 2017, 04:17

Yes - the Orbital layer does exist.

However -- like quite a few things inside the engine - it wasn't really developed. There is no transition event that I am aware of, in the same way that there is for other units moving between layers. As such, no unit, no matter how high in elevation, is ever really in the Orbital layer. There is no 'SETCURRENTLAYER' method which might address that issue.

If I understand what you are trying to do with it, you're trying to make ORBITAL units work properly (ie. - Satellites). Black Ops Unleashed dealt with this by creating an anti-satellite weapon which could only target units of the SATELLITE class. However, it also made sure to restrict the SATELLITE category from all weapons (except this special one) that could target that layer.
Sprouto
Priest
 
Posts: 366
Joined: 08 Sep 2012, 05:40
Has liked: 54 times
Been liked: 74 times
FAF User Name: Sprouto

Re: Questions about the "Orbital" layer.

Postby Tanksy » 22 Jan 2017, 16:58

Ahh interesting. That's provided me the solution, thanks Sprouto.
Tanksy
Avatar-of-War
 
Posts: 75
Joined: 31 Aug 2016, 11:39
Has liked: 1 time
Been liked: 14 times


Return to Mods & Tools

Who is online

Users browsing this forum: No registered users and 1 guest