Jump to content
Sign in to follow this  
(AEF)Swordsman

Add to a unit's init line via trigger

Recommended Posts

I used the search but I guess due to me not quite knowing the way to word my question it made it hard to find anything to help me out, so:

What I'm trying to do is add Blake's artillery script to a unit after an event so that it doesn't start calling artillery/mortars until a variable has been met.

So I need to add this line here:

null = [this,mortar1,500,1] execVM "FO-ai.sqf"; 

To the unit named "artilleryguy" once the variable has been met.

I know there's a way to add to a unit's init line dynamically but I just can't seem to find it. Any help would be greatly appreciated :)

Share this post


Link to post
Share on other sites

Just call it like that with the trigger?

null = [artilleryguy,mortar1,500,1] execVM "FO-ai.sqf";

Anyway, setting a unit's init line looks like this:

artilleryguy [url="http://community.bistudio.com/wiki/setVehicleInit"]setVehicleInit[/url] "null = [this,mortar1,500,1] execVM 'FO-ai.sqf';";
[url="http://community.bistudio.com/wiki/processInitCommands"]processInitCommands[/url];

Share this post


Link to post
Share on other sites
Just call it like that with the trigger?

null = [artilleryguy,mortar1,500,1] execVM "FO-ai.sqf";

:butbut: I've been staring at this for so long I missed the obvious. Thank you haha

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  

×