Jump to content
Sign in to follow this  
Nano Soft

Alarm triggers, please help

Recommended Posts

I am in the making of a mission but I don't know how to make it so say when to fire you gun a alarm goes off. Can some one please help me?

Also how can I make it so when I have a trigger and it has in it activation box the <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">"3" Objstatus "hidden" How can you make it so in the same trigger, in the same box, have it so another one of those or another script in right behind it? Do you put a space(I tried that and it didn't work)? Or do you just make another trigger?

Share this post


Link to post
Share on other sites

If im not mistaken to make a alarm sound when the gun is fired you set the trigger to have West detected by East for example, then under the effect go to voice and choose Play alarm. Im sure there is a simplier way.

For you second question, just put in a semi-colon and a space

"3" Objstatus "hidden"; [this] exec "script.sqs"

or what ever you want it to do next.

Share this post


Link to post
Share on other sites

Try searching for eventhandlers, the "fired" one in particular, it can exec anything/do anything really.. quite nifty.

Share this post


Link to post
Share on other sites

Hi,

Let's say your group name is group1. Add this line to the group leader init field:

{_x addEventHandler ["fired", {{_x removeAllEventHandlers "fired"} forEach units group1;playSound "alarm"}]} forEach units group1

Just replace the section playSound "alarm" with the sound you want. The sound will be played as soon as a unit of group1 fire a shot.

Cheers

Share this post


Link to post
Share on other sites
Hi,

Let's say your group name is group1. Add this line to the group leader init field:

{_x addEventHandler ["fired", {{_x removeAllEventHandlers "fired"} forEach units group1;playSound "alarm"}]} forEach units group1

Just replace the section playSound "alarm" with the sound you want. The sound will be played as soon as a unit of group1 fire a shot.

Cheers

I tried what you said and it works, thanks.

I have another question. When you have what you said in the int field how do you make it so when the alarm goes off units leave there way points and rush to a new way point in the direction of the gun shots?

Share this post


Link to post
Share on other sites

I was thinking that someone with some decent scripting skills would hopefully make a template for a stealth mission type thing in which the AI behaves half human instead of having omniscient abilities.

All the stealth missions I've played aren't that good.

You kill someone. Alarm goes off.

Nobody needs to see it or know about it. And the alarm is just set off so you don't have the chance to kill the guy before he sets it off.

Failing that, I always though the ai was always either too good or not good enough. I'd like to see the ai search in the general direction of an incident instead of relentlessly persuing something they haven't even seen with meticulous accuracy. (as they do with a guard waypoint)

You can be a kilometer away and they just magically know where you are. No searching or anything ambient or cool. They just home right in. Kinda kills the stealth element.

Share this post


Link to post
Share on other sites

I know what you mean, hopefully OFP2 will be better in terms of stealth.

Share this post


Link to post
Share on other sites
I know what you mean, hopefully OFP2 will be better in terms of stealth.

If it was only like a mixture of OFP and Splinter cell that would be sweat for stealth.

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  

×