Jump to content
Papa n3rf

Horrible with scirpts and such

Recommended Posts

Hello I am REALLY bad at doing scripts, I tried looking for a way to add a custom alarm to and object that will be able to set off via scroll wheel by anyone... I could really use some help.

 

Share this post


Link to post
Share on other sites

Wrong subForum. Try mission editing and scripting. 

 

Assuming you know what to do with the script and it being for multiplayer you could use this: 

//Change object to whatever you want to have the action on
[object,["Start Alarm","alarm.sqf"]] remoteExec ["addAction",0]; 

//Make a file called "Alarm.sqf" and put in your mission
playSound3D ["A3\Sounds_F\sfx\alarm_independent.wss", object]; 

Good luck! 

Share this post


Link to post
Share on other sites

He wants an action to set it off not to start it.

 

This should do the job

// put this in the init of your object

_dummy = "#particlesource" createVehicle (getPos this);
playSound3D ["A3\Sounds_F\sfx\alarm_independent.wss", _dummy];

this addAction ["Stop the alarm", { deleteVehicle _dummy; }];

 

Share this post


Link to post
Share on other sites
On 05/10/2018 at 2:27 PM, Dedmen said:

"Setting something off" is english for "triggering something" or "being something"

 

Yes, I meant "turn off". Thanks for the correction

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

×