Jump to content
Sign in to follow this  
11_harley_11

playable unit trigger

Recommended Posts

Hi there,

Would someone mind talking me through making a trigger that makes a unit playable only after a task is completed?

I have some reinforcements sitting in a chopper off world which I can call in after Task1 is completed (they join my squad via a trigger). But I don't want the option to switch to them until they're on the ground. Is this possible?

any help greatly appreciated.

Share this post


Link to post
Share on other sites

yeah thanks for that. I actually found those already but I'm not sure what to do with them. The wiki isn't very noob friendly.

I have unit1 , unti2 etc as playable. Do I make a trigger and put addSwitchableUnit unit1, unit2 etc in the act of trigger? And put task1 in the condition? If so what should the syntax look like in the act?

---------- Post added at 08:43 AM ---------- Previous post was at 08:03 AM ----------

ok so I've got one of the units playable with this 'addSwitchableUnit unit1' in the triggers act and task1 in the condition. But what do I put in it to add unit2 unit3 etc? 'addSwitchableUnit unit1, unit2, unit3' gives me a missing ] error. Can someone help me with the line?

Share this post


Link to post
Share on other sites

Can anyone help me with this line?

'addSwitchableUnit unit1, unit2, unit3'

this gives me a 'missing ]' error. I guess I'm missing 3 kinds of brackets, a question mark, maybe a dancing banana? :icon_wink:

Share this post


Link to post
Share on other sites
Syntax: addSwitchableUnit unitName

Parameters:

unitName: Object

Type "object" means the command can only take one object at a time.

addSwitchableUnit unit1;
addSwitchableUnit unit2;
addSwitchableUnit unit3;

{addSwitchableUnit _x} forEach [unit1, unit2, unit3];

Both of these do the same thing.

Share this post


Link to post
Share on other sites

Can this be made to work in MP. I cant seem to find a way to do that

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  

×