Jump to content
Barba-negra

addaction trigger repeat

Recommended Posts

hello to all my dear colleagues, I am working with an addaction trigger, and it works well, the only thing is that once I do the action, it does not work again

 

this is what I have;

 

in the vehicle:

 

this addaction ["sonar",{Trigger_Con = true; publicVariable "Trigger_Con";}];

 

in the condition of the trigger:

 

Trigger_Con;

 

on act:

 

Boat say3D "ping";

 

I get it to activate and work only once, and it works, but only once, how do I get it to work every time I activate it? please help

 

 

 

 

Share this post


Link to post
Share on other sites

Why are you using a trigger for that?

anyway, your trigger must be repeatable and deactivated then re-activated. that means trigger_Con false then true again somewhere.... if you intend to keep this trigger.

Share this post


Link to post
Share on other sites

Well I'm really not a programmer, I have little knowledge and that's why I use this method because I do not know another one, but I do not understand the trigger correctly. With false I must place it in the trigger condition? or in the addaccion?

Share this post


Link to post
Share on other sites

this addaction ["sonar",{ [Boat, 'ping'] remotExec ["say3D"] }];

Share this post


Link to post
Share on other sites

wow how beautiful it looks, I'm going to try it, thank you friend

Share this post


Link to post
Share on other sites

I try it but it does not accept the friend code, the trigger also has other functions so I would like to make the activator repeat itself through addaction, will there be any other way?

Share this post


Link to post
Share on other sites

I got it, I moved the scripts to an sqf file and I called it with the addaction and I can do it several times, and I added the sonar return dial, but now I have another problem, I would like it to only sound when there is an enemy at maximum 3000 meters, how could I do it ?, this is what I have

 

//ping

boat say3D "ping";

 

//Lugar


_markerstr = createMarker ["markername",[0,0]];
_markerstr setMarkerShape "ICON";
 
_markerstr setMarkerType "hd_dot";

 

//Retorno

 

[] spawn {
while{not isnull Heli1} do {"markername" setmarkerpos getpos Heli1;
sleep 10, deleteMarker "markername"};
};

 

please help

 

Share this post


Link to post
Share on other sites

Hi there I am attempting to use this script/code in my mission one addaction to activate a CAS Bomb strike using a compture as the object the other is to activate a video on a screen the issue I have is both triggers get activated when using this method is there any way to change the trigger condition so that only the intended trigger gets activated. Thanks

Trigger_Con;

 

this addaction ["Triger",{Trigger_Con = true; publicVariable "Trigger_Con";}];

Share this post


Link to post
Share on other sites

Use different conditions for different triggers?

Trigger_Con is a variable that you're defining as true and broadcasting to all computers (publicvariable) when you use the action (meeting the trigger´s condition).

You can use any variable you wish within your triggers' conditions and your actions.

So, if you want two different triggers activated by two different actions you can e.g:

Trigger_Con1; 

this addaction ["Triger1",{Trigger_Con1 = true; publicVariable "Trigger_Con1";}];

Trigger_Con2; 

this addaction ["Triger2",{Trigger_Con2 = true; publicVariable "Trigger_Con2";}];

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

×