Jump to content
Sign in to follow this  
finguide

Trigger action visible only to the player who launched it?

Recommended Posts

This may be an old question, but I have no idea about the words that I could use to search already existing threads.

I'm creating a simple chopper autorotation practice mission and I use Radio Alpha (and special zone) to set chopper engines off, but it's little impractical if every chopper engines turn off when one player wants to shutdown his engine and try to land. My question is, how do I restrict trigger action to only the player that launched it?

Share this post


Link to post
Share on other sites

on act:

(vehicle player) setFuel 0;

triggers beheave local in MP so should be no problem there.

Share this post


Link to post
Share on other sites

But as it's a radio trigger would that apply, as you can't find out who called the trigger.

Wouldn't it fire on every machine and any player in a vehicle have no fuel.

Share this post


Link to post
Share on other sites

He could just create multiple radio triggers (Alpha, Bravo...) and use this line

Radio Alpha:

(vehicle p1) setFuel 0;

Radio Bravo:

(vehicle p2) setFuel 0;

Just make sure every player knows what radio (Alpha, Bravo...) he should use.

You could enter a description for the radio triggers like:

"Player 1 chopper engines off"

Share this post


Link to post
Share on other sites
But as it's a radio trigger would that apply, as you can't find out who called the trigger.

Wouldn't it fire on every machine and any player in a vehicle have no fuel.

Exactly this is the problem. Using different radio trigger to every chopper isn't an option, because there's not enough radio triggers available. On the other hand, the special area shutdown works (engines of choppers in green zone will shutdown in 10 seconds from entering to zone). When chopper enters zone, three triggers will activate:

Activation BLUFOR, Present 
On act. list_to_kill=thislist

Activation BLUFOR, Present
Countdown 10 seconds
On act. {_x setFuel 0} foreach thislist;

Activation BLUFOR, Present
Countdown 5 seconds (sync with shutdown)
On act. _handle = execVM "Shutdown.sqf" (=hint row "Ready..." "Set..." "Go!")

One more question; how to get rid of super annoying "File xxxxxx not found" notification that appears when I play a custom sound in multiplayer? The sound is played but everyone gets still the error message when trigger playing the sound is activated. Sound is in MPMissions\Mission\sound, and I have it determined in description.ext file (class cfgSound) etc.

Edited by finguide
typo

Share this post


Link to post
Share on other sites

I'd use an addaction which is only available to the pilot when inside the testing area.

This placed in the heli init. trigtest can be the name of the trigger or any object.

place in vehicle init

this addAction ["Kill Engine","Kill_engine.sqf",[1],0,false,true,"","player == driver  vehicle _this and player distance trigtest <350"];

Kill_engine.sqf

_this setfuel 0;

The option to kill the engine will show in the menus on the left of the hud.

Share this post


Link to post
Share on other sites

F2k Sel, I get the option to "Kill Engine", but nothing happens when I select it. I have Kill_engine.sqf and that

_this setFuel 0;

in it.

Share this post


Link to post
Share on other sites
I can't see what your doing wrong but it works perfectly here.

try this.

addaction driver

I checked it and changed _this setFuel 0; to vehicle player setFuel 0; and it works now like charm. Thanks!

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  

×