Jump to content
Sign in to follow this  
kraftingkoma

How To Make Coded Alarms. [Requesting Help]

Recommended Posts

hey guys. Im trying to make a script for my group. As the title says, i need alarms. Basically what I need help with is. When they walk up to a power generator. The'll see CODE RED, CODE YELLOW, CODE GREEN. I just would like it to show a hint. On Red it would play the premade game sound Alarm 2. I just cant figure out how to do this. Much help would be obliged.

Share this post


Link to post
Share on other sites

just define a trigger's condition in the editor and execute a script like the following.

Trigger:

Condition: attack

OnAct: script = [] execVM "alarmScript.sqf"

alarmScript.sqf

[color="#FF0000"]alarmName1[/color] = createSoundSource ["Sound_Alarm2", [color="#0000FF"]markername[/color], [], 0];
[color="#FF0000"]alarmName2[/color] = createSoundSource ["Sound_Alarm2", [color="#0000FF"]markername[/color], [], 0];
[color="#FF0000"]alarmName3[/color] = createSoundSource ["Sound_Alarm2", [color="#0000FF"]markername[/color], [], 0];



waitUntil {!attack};

deletevehicle [color="#FF0000"]alarmName1[/color];
deletevehicle [color="#FF0000"]alarmName2[/color];
deletevehicle [color="#FF0000"]alarmName3[/color];

You also need to create markers and type their names in the script.

Alarms are soudsources, so you will hear where they come from: Marker position = sound position.

Cant really understand what you mean with your CODE RED stuff. But I guess you need three trigger's which fire individually for the different situations.

Or perhaps you can use the switch command.

Give more information and we could help you out ;)

Edited by _qoR

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  

×