Jump to content
Sign in to follow this  
yogdogz

Scaring civilians with smokes or gunfire

Recommended Posts

any idea how to make groups of civilians or civilians car scared and run away when you are throwing smoke or shooting some couple of bullets? (like in PMC campaign - vocation) and make them runaway in panic instead prone down like nothing is happening.

maybe a script like detecting if player throwing/shooting near the civilians, then it trigger them to go with waypoints. i guess it involved something like event handler, but i suck at scripting. i would love to see that working :D

thanks

Share this post


Link to post
Share on other sites

There is a firednear eventhandler.

I tried placing in in the civs init but the problem was it only seems to work if weapons are fired near to a civ ie 50meters, I guess the name gives it away.

What I found better was to place a series of gamelogics around the area about 40meters apart this gives you better coverage.

Then I place a trigger over the civs who I'll want to do the running.

The code goes like this.

1.

Place several around your civs 40-50 meters apart

Gamelogic init

this addEventHandler ["firednear" ,{run_away=true}]

2.

Place a trigger over the civs set it to

Civs present repeating

On act

{

_x allowfleeing 1;_x setskill ["courage",0];_x disableai "fsm"} foreach thislist;run_away=false

It won't detect thrown weapons and civs running do like to stop for no reason.

I take that back the do run when a grenade is thrown.

Edited by F2k Sel

Share this post


Link to post
Share on other sites

thanks, got it working now... and i figured it out how to use smoke to scare the civilians too..

here's the mission, the one is to drive away a crowd of protester, the other one to drive away civilian cars (somekind of road checkpoint), both with smoke or gunfire to scare them (seeing them running away scared is somewhat funny :D).

Edited by yogdogz

Share this post


Link to post
Share on other sites

Can I use it to scare civilians and make them run purely by setting off a trigger? I.e. my presence activates trigger and they run?

Share this post


Link to post
Share on other sites

Sure, instead of triggering "run_away=true" from the eventhandler just set that via some trigger or distance check or something.

Share this post


Link to post
Share on other sites

Taking yogdogz's example above you could just add a trigger just beyond the barricades and group it with the player. That will make it's activation as "Vehicle Present" - meaning, the player is in the trigger. Then just set it's onAct to "runaway = true;" which is the trigger to scare the people. It would look like this:

baras.jpg

So to scare away the crowd you'd either shoot, pop smoke or simply walk past the barricades.

Share this post


Link to post
Share on other sites

Thanks for the reply. In my mission, I just put down a trigger in amongst the civies and attached it to my player character as a 'group', just like you said. However, it hasn't triggered a 'mass panic' or anything. Am I missing something?

Update: I copied the guy's mission and made sure to copy over all the triggers, game logic and even the marker. Seems to be working okay, but when I shoot to trigger it. They start to run then stop. Strange since the mission I downloaded from above worked just fine. I shall have to play around with it more.

Edited by Mach2Infinity

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  

×