Jump to content
Barba-negra

trigger execute only server

Recommended Posts

hello friends a greetings to all and a hug, I come here with a doubt if they can help me, I'm trying to create a trigger that runs only on the server here an example:

 

Costera3 = createTrigger ["EmptyDetector", getPos cubo]; 

Costera3 setTriggerArea [0, 0, 0, false];  

Costera3 setTriggerActivation ["LOGIC", "PRESENT", true];

Costera3 setTriggerStatements ["

(Soldado3 distance Costera03) < 3000;

", "

 

execVM "\scripts\scripts.sqf";

 

", "

 

];

 

I have seen that in the editor EDEN, trigger has a box that says only in server, and I did this same trigger from the editor with the box checked and it worked perfectly, my question is how can I execute it in the same way only in server but for half of a trigger created as shown in the example, thank you very much

Share this post


Link to post
Share on other sites
Just now, elthefrank said:

but for half of a trigger created as shown in the example

Half? what?

I don't see anything half in the example?

 

Just now, elthefrank said:

my question is how can I execute it in the same way only in server

If you want to create a trigger that's only on server. You need to only run the script on server and set the "makeGlobal" parameter of createTrigger to false.

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

  • Like 1
  • Haha 1

Share this post


Link to post
Share on other sites

I understand friend then should I create it this way?

 

Costera3 = createTrigger ["EmptyDetector", getPos cubo, makeGlobal];  ?

 

and in false where should I put it?

Share this post


Link to post
Share on other sites
Just now, elthefrank said:

Costera3 = createTrigger ["EmptyDetector", getPos cubo, false];

 

  • Thanks 1

Share this post


Link to post
Share on other sites

Costera3 = createTrigger ["EmptyDetector", getPos cubo, false];  

 

Sorry I think that should be it?

 

 

Share this post


Link to post
Share on other sites

ok thanks now I understand, thank you friend, I'll be doing tests

  • 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

×