Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Help with fleeing script

Author
Message
nathan 24
15
Years of Service
User Offline
Joined: 22nd Jun 2009
Location:
Posted: 13th Apr 2011 19:58
Hello all!
I need some help with a script, what i want is for me to fire a shot of a gun and for all none enimes to run away, (eg. Civilians).

Thanks Very Much
Nathan
bobochobo
16
Years of Service
User Offline
Joined: 9th Jul 2008
Location: My house, in the middle of my street
Posted: 13th Apr 2011 20:05
How far have you got so far?

nathan 24
15
Years of Service
User Offline
Joined: 22nd Jun 2009
Location:
Posted: 13th Apr 2011 22:23
nowhere
bobochobo
16
Years of Service
User Offline
Joined: 9th Jul 2008
Location: My house, in the middle of my street
Posted: 13th Apr 2011 23:40
Quote: "all none enimes to run away"


So what you want them to run away?

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 13th Apr 2011 23:48
Doesn't the script "coward10.fpi" already do that?

For media, utilities and more...
Visit ExploSoft.com
Michael Thompson
16
Years of Service
User Offline
Joined: 15th Aug 2008
Location: Behind you (if not, in australia)
Posted: 14th Apr 2011 09:20
No, I think that just makes them cower. but I might be wrong.

http://www.flashstargamecreations.webs.com
nathan 24
15
Years of Service
User Offline
Joined: 22nd Jun 2009
Location:
Posted: 14th Apr 2011 12:45
coward10 makes them cower, only if shot,
i want them to cower at if i shoot someoneelse
Thanks
Nathan
Anigma
13
Years of Service
User Offline
Joined: 25th Mar 2011
Location:
Posted: 14th Apr 2011 15:30 Edited at: 14th Apr 2011 15:31
What you want to do is define a global variable and then have the entities check that variable.

I'd set up a trigger zone that will set that variable to 1 if a left mouseclick is detected. Then in the main for each non-combatant entity, have them switch to cowering if that variable is set to 1.

Finally, as a finishing touch, have a cooldown period (this is achieved by setting another variable to 1000 or 5000 or however long - in milliseconds - you want the cooldown to be, then subtract 1 from it on each cycle) so that when the timer runs out, they return to normal.

I'd write it for you, but then you wouldn't learn much from that, so take a crack at it yourself and let us know if you have questions.
nathan 24
15
Years of Service
User Offline
Joined: 22nd Jun 2009
Location:
Posted: 14th Apr 2011 19:44
Thanks so much Anigma, ill try it now

Nathan
Ben123
13
Years of Service
User Offline
Joined: 15th Apr 2011
Location:
Posted: 15th Apr 2011 17:59
Sorry but i dont understand wha everyones saying, i would also like this scipt, could you post it Anigma?
Michael Thompson
16
Years of Service
User Offline
Joined: 15th Aug 2008
Location: Behind you (if not, in australia)
Posted: 16th Apr 2011 09:32
I would say if the entity hears sound x then it responds, but I thinkI tried that once and they responded to my footsteps.

http://www.flashstargamecreations.webs.com
bobochobo
16
Years of Service
User Offline
Joined: 9th Jul 2008
Location: My house, in the middle of my street
Posted: 16th Apr 2011 23:41
Sound x only checks if the hear any sound, it isn't specific to the sound file.

Login to post a reply

Server time is: 2024-11-24 08:44:25
Your offset time is: 2024-11-24 08:44:25