Jump to content
Sign in to follow this  
frankie2spankie

:need some help

Recommended Posts

Ok, this is what i need

I want a condition which checks to see if a unit has fired a flare within a given area.

Tried a couple of things, such as got ammo...but the trigger is activated if the unit drops the flare.

Help purlease

Share this post


Link to post
Share on other sites

urm, ok, i may be a bit rusty on OPF scripting, but here's my go:

have a trigger grouped to the player/person who is firing the falre, and have it set to Present, and in the On activatiopn box have this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

a1 = true

;you can have a1 as anything else, its just a variable.

then, in the person to fire the flare's init line have this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this addeventhandler ["fired",{[_this select 1]exec "firedflare.sqs"}]

then in firedflare.sqs have this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

?_this select 0 != "thenameoftheflarelauncher": exit

a2=true

;again, you can change a2 to something else.

In another trigger put:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

Condit:a1 && a2

OnActiv:blahblahblah etc. (the thing you want to happen)

This should work, iI hope it does.

the_unknown_one

Share this post


Link to post
Share on other sites

You can also use the onflare scripts built into OFP, have a search from them.

RED

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  

×