OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Shadow.D. ^BOB^ on 26 Jul 2008, 00:27:32

Title: Trigger probability...
Post by: Shadow.D. ^BOB^ on 26 Jul 2008, 00:27:32
Hi there, i did do a quick search for this but sorry if i've missed something.

I was wondering is there a way to give a trigger a propability of presense like you can with a unit?

Basically i'm creating an occupied template for my squad to use on the new Avgani map.  I want to place triggers around the map as (IED'S), have them on a low probability, but there is a chance that one will be set off.

Hope thats clear.....   :D  Not sure if i understand what i put, myself.

As always thankyou in advance for any help.
Title: Re: Trigger probability...
Post by: Carroll on 26 Jul 2008, 05:00:50
Well, one way is to use a number of invisible H Pads as the getPos points for each explosion. If you give these invisible objects (or IED objects, whatever) a probability of presence, you should get the same result...

put this in IED1's trigger on Act.
Code: [Select]
Bomb123 = "Bo_GBU12_LGB" createVehicle (getpos IED1);then in IED2's trigger on Act.
Code: [Select]
Bomb123 = "Bo_GBU12_LGB" createVehicle (getpos IED2);etc, etc


then simply give each of your IED's (editor placed object: invisible H Pad, IED looking object, etc) the desired probability of presence %

If you can find a good IED object to use (there are a few addons out there available), it could be an editor placed log, barrel, wreak, or even a rock. Just be careful not to make the object to obvious or else they will be easier to spot than a Mine in the middle of the road! Try to blend them in or disguise them as real Insurgents do! This in my opinion is the more realistic way to go, as by setting each objects Probability of Presence, the object is either there or not. If the IED object ain't there, the trigger will still activate for each, but nothing will happen as the explosion has no object to 'getPos' to  :cool2:
Title: Re: Trigger probability...
Post by: Shadow.D. ^BOB^ on 26 Jul 2008, 11:29:12
Thanks, i will have a play and see what can be done.

EDIT:- Cheers for that dude, just used game logics for the pos, but all works fine n it does the job nicely.