Jump to content
Sign in to follow this  
william516

Probability of a trigger not a unit or group

Recommended Posts

Ok I have searched all over the forums so please excuse my question. I have been able to find a ton of information but nothing to answer this situation. Here is the idea. This is based on what is currently going on over seas. As many of you may know there have been a lot of attacks called "Green on blue" Meaning that the ANP's have been changing and attacking the us soldiers. Not only that but vbied as well at checkpoints and on convoy MSR's

The idea is first NOT to poke fun or insult any soldiers BUT instead to try and convey in a game/sim/movie just what we are facing overseas. To show that you can NOT become complacent and consider things as routine.

I'm trying to make a unit VBIED, an old junker car or cycle spawn and dry around the MSR and even approach the front gate of a checkpoint. I have set the car prob to 50% and written a trigger for it to explode on approx 0-10 sec delay when blufor comes close to it. The problem is that the way this is written it will be too easy to just "know" the car is the bomber. I actually need the trigger to be at the 50% prob. That way just because you see the car doesn't mean it will explode. It could ride around and be fine the whole mission or it could detonate next to your convoy or you main gate. I have tried several ways but can only set the prob of the unit and not the trigger. I'm sure im missing something easy.

The second scenario is one that is becoming WAY to common and we train each day to counter. There is really no way to put the fear into the game that the soldier faces on a daily basis. That is having a ANP with a loaded rifle turn on your team members. The idea again is to use a trigger and find a way to set the prob of the trigger at 50%. That way the units will always be present in the mission but there is no way of knowing if they will turn after a set time or condition. Forcing you to act quick and take them out before your team goes down.

Please let me know what i need or a missing to make this work as intended. Again I am NOT trying to poke fun at anything that occurs overseas. I respect and honor ALL the US soldiers. Soon I will be taking the place of and MP unit over there.

Hoping to use this as a battle simulator for my squad. Show them in real time and go ever drills of what we would do in that situation.

Bill

153rd MP Co

Share this post


Link to post
Share on other sites

Hi not sure if there is a better way but you try executing a script from the trigger, the has something like,

_prob = random 10;

if (_prob >= 5) then {blow car up}else{honk...horn};

Share this post


Link to post
Share on other sites

Sometimes I wonder why I try to help. :confused:

After reading his latest post on Armaholic I'm thinking a waitUntil distance check might be better then the traveling trigger. Wait till you're in range, do the percentage check then blow up or sleep on it and cycle the check once blufor is out of range again. Meh, whatever.

Share this post


Link to post
Share on other sites

I appreciate all the help and im not trying to cause trouble. I have searched all over and the prob of a trigger does not seem to be covered. my scripting level is very limited so im trying to find the easiest way to pull this off. I'm not sure i understand the "range" idea or the script called at random. If someone could please explain in a little more detail i will mess around with that. I just dont want to have to set the prob. of the object or unit because then any time the player sees the unit they will know something is up. The idea is to remain vigilant.

sorry for the posting in armoholic im just trying the minds of everyone.

Bill

Share this post


Link to post
Share on other sites
Hi not sure if there is a better way but you try executing a script from the trigger, the has something like,

_prob = random 10;

if (_prob >= 5) then {blow car up}else{honk...horn};

I think that after all my tried this is going to be my best bet. Could you please explain a little more on how to set the script. I think this has the best chance of success. I have tried multiple ways and still no success with anything. It seems that all i can do is create the object with a prob. of 50% and not have the trigger, or have two cars that are the same both with a 50% prob but have only one with the trigger attached. The only problem with this is that sometime both cars will show up. I really only wanted the one car with the trigger at 50% prob.

So if someone could give me a little more info on setting up this trigger i would be very greatfull.

Bill

Share this post


Link to post
Share on other sites

Why not just delete the trigger %50 of the time

name the trigger trig 1

and then place this in an object or game logic init.

if (random 10 >5 ) then {deletevehicle trig1}

Share this post


Link to post
Share on other sites

Just a quick question about this.

Why not just delete the trigger %50 of the time

name the trigger trig 1

and then place this in an object or game logic init.

if (random 10 >5 ) then {deletevehicle trig1}

This is a really good idea and I will have to try it. Could you please explain something. I would assume that this would then go in the init. line of the car that would be the bomber? This would then cause the car to be spawned 100% of the time but yet the trigger would only go off 50% of the time. I guess the deletevehicle command can also be used for triggers? Thanks again for the idea. I will have to try this with the green on blue situation too.

Share this post


Link to post
Share on other sites

deletevehicle refers to any object and not just a car or plane, it can be man, ammobox ect as long as you name the trigger trig1 it will delete that as well.

The above could go in the car init line of the car or any other unit or game logic.

The car will be there %100 of the time as will the trigger but it will be instantly deleted %50 of the time.

There's no need to change anything as long as the trigger is named trig1

Share this post


Link to post
Share on other sites

Thankyou all for your help the very last idea is the one that worked the best. After playing the scenerio multiple times the trigger fired only twice. This will be perfect for catching people off guard and also using the cam footage for a training aid in never asume anything.

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  

×