Jump to content
Sign in to follow this  
Cryptdik

Using HoldActionAdd

Recommended Posts

Trying to make a simple objective of approaching a Hunter wreck and a trigger adds a Hold Action to it to "search" the wreck using this:

https://community.bistudio.com/wiki/BIS_fnc_holdActionAdd

 

I put this in the OnAct of the trigger but the action doesn't appear:

[hunterwreck1,"Search Wreckage","\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa","\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa","_this distance _target < 3","_caller distance _target < 3",{},{},{task1trigger setTriggerActivation ["WEST", "PRESENT", true]},{},[],10,0,true,false] remoteExec ["BIS_fnc_holdActionAdd",-2,hunterwreck1];

Share this post


Link to post
Share on other sites
1 minute ago, Grumpy Old Man said:

Anything you did in terms of debugging and finding the error?

 

Cheers

I replaced this with a simple "addAction" setup. The action is created by a BLUFOR PRESENT trigger, and the goal of the action is to set the trigger activation of a second trigger to BLUFOR PRESENT as a means of activating a new trigger that serves to manipulate Task Modules via syncing which works fine. This way it uses:

task1action = hunterwreck1 addAction ["Search Wreckage", {task1trigger setTriggerActivation ["WEST", "PRESENT", true]}];

 

This does work but it doesn't have any holding time which is what I'm going for. So I try to replace that with this in order to make it a Hold action:

[hunterwreck1,"Search Wreckage","\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa","\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa","_this distance _target < 3","_caller distance _target < 3",{},{},{task1trigger setTriggerActivation ["WEST", "PRESENT", true]},{},[],10,0,true,false] remoteExec ["BIS_fnc_holdActionAdd",-2,hunterwreck1];

 

Using this I don't see an action on the same vehicle that using the simpler AddAction works on. I'm using "remoteExec" because this is going to be a CO-OP mission and from what I've gathered that will call the function via the server or something like that. Should I be using the basic "call" instead of this or will it not work for COOP task setup?

Share this post


Link to post
Share on other sites

Are you testing this on a dedicated or local multiplayer host?

remoteexec target -2 won't execute the action on the server, only on clients.

That might be the problem if you're hosting your own MP server for testing purposes.

Try changing it to 0.

 

Cheers

  • Like 1

Share this post


Link to post
Share on other sites
8 hours ago, Grumpy Old Man said:

Are you testing this on a dedicated or local multiplayer host?

remoteexec target -2 won't execute the action on the server, only on clients.

That might be the problem if you're hosting your own MP server for testing purposes.

Try changing it to 0.

 

Cheers

Yaay it works. Thanks a bunch

  • Like 1

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  

×