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 / Newbie needs script halp.

Author
Message
Plottato
14
Years of Service
User Offline
Joined: 13th Apr 2010
Location:
Posted: 14th Apr 2010 04:22
I was trying to make a script for an enemy. He's supposed to run away when the player comes within about 10 feet of him, but it doesn't work! Can someone correct my error and tell me why it didn't work? Thanks!





;Artificial Intelligence Script

;Header

desc = Run Away If Player Seen

;Triggers

:random=20:rotateheadrandom=65
:plrdistwithin=3:state=1

:state=1:rotatetotarget,rotatey=180,resethead,animate=5,state=3
:state=3:runfore=10
:state=3,random=5:rotateheadrandom=85
:state=3,losetarget=10:state=10
:state=3,plrcanbeseen:settarget,state=2

:state=10:timerstart,state=11,rotatey=180,animate=31
:state=11,timergreater=5000:state=0,animate=5,waypointstart
:state=11,random=5:rotateheadrandom=35

;End of Script

Alteration 808 Coming soon.
Shadowtroid
14
Years of Service
User Offline
Joined: 23rd Dec 2009
Location: nope
Posted: 14th Apr 2010 14:38 Edited at: 14th Apr 2010 14:39
Well, first off, the plrdistwithin part is waaaay too close. It also will always work, even if you go to state 1. It should probably be something like this:





A r e n a s
16
Years of Service
User Offline
Joined: 9th Jun 2008
Location:
Posted: 14th Apr 2010 22:35
I expect you may get a mod attack soon with non-constructive thread names Shadowtroid seems to have answered your question anyway

Shadowtroid
14
Years of Service
User Offline
Joined: 23rd Dec 2009
Location: nope
Posted: 14th Apr 2010 22:38
Quote: "I expect you may get a mod attack soon with non-constructive thread names "


Arenas, don't say that. The proper word is "Nickeydude'd."

Overall, I'm just glad to see a new guy who has a script. Whether or not he made it is another story, but I could get a "new" vibr from it.

Plottato
14
Years of Service
User Offline
Joined: 13th Apr 2010
Location:
Posted: 15th Apr 2010 01:37
Hey, thanks everybody, I'm not new to anything about FPSC besides scripting. I really appreciate the help!

Alteration 808 Coming soon.

Login to post a reply

Server time is: 2024-11-24 23:30:12
Your offset time is: 2024-11-24 23:30:12