Jump to content
Sign in to follow this  
tortuosit

How to access a unit from its own init field?

Recommended Posts

Hi,

 

I'm in Eden, I manually place some playable units and want apply some code to them, (like "setunitloadout") - from their own init fields. But "_this" does not have the unit identifier, right? How can I do it? If it was the player, I can simply access him via "player".

 

So, more in general: how to access an object from its own init?

 

Thx

Share this post


Link to post
Share on other sites

ex:

//init field
[this] call mud_fnc_init;

//mud_fnc_init:

params[["_unit",objNull,[objNull]]];
//_unit is editor reference to unit

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×