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 / Need a little help with my version of the pace script

Author
Message
ash grinder
17
Years of Service
User Offline
Joined: 22nd Nov 2007
Location: ...from space!
Posted: 28th Nov 2007 11:02
Hi everyone, Im having a lot of trouble understanding the modified pace script that I have made. It should work, but I don't understand why! Its taken almost 3 hours, but the entity just stands there and just stares back at me. Here is what I have done:

First I modified the pace script and saved it as a different name, started the game and noticed that the entity followed the waypoints just fine. He also wasn't targetting me anymore (so this is what I wanted too).

But the very aggravating thing here is when I made my own script, based on the pace script from scratch and saved it under a new name (ie: pacenormal), it wouldn't work then.

Here are the scripts for both in order to compare them:
Here is (obviously) the reg pace-script:
;Artificial Intelligence Script

;Header

desc = Hunt And Pace Waypoints

;Triggers

:waypointstate=0:animate=2,waypointstart
:waypointstate=3:animate=2,waypointnext
:waypointstate=4:animate=2,waypointrandom
:waypointstate=5:animate=2,waypointreverse
:nearactivatable=0:settarget,activatetarget=2,animate=1,state=0

:state=0:state=1
:state=1,plrcanbeseen:settarget,state=2
:state=1,random=20:rotateheadrandom=65
:state=1,random=60:rotatetoplr
:state=1,shotdamage=10:settarget,waypointstop,animate=1,rotatetotarget,resethead,state=4
:state=1,noiseheard=5:rotateheadrandom=85

:state=2:waypointstop,rotatetoplr,state=3,shootplr
:state=3:animate=1,waypointstart,state=0

:state=4,plrcanbeseen=46:settarget,state=2
:state=4,random=20:animate=2,waypointstart,state=1

;End of Script


And here is my altered one:
;Artificial Intelligence Script

;Header

desc = Pace Waypoints

;Triggers

:waypointstate=0:animate=2,waypointstart
:waypointstate=3:animate=2,waypointnext
:waypointstate=4:animate=2,waypointrandom
:waypointstate=5:animate=2,waypointreverse
:nearactivatable=0:animate=1,state=0

:state=0:state=1
:state=1,plrcanbeseen:
:state=1,random=20:rotateheadrandom=65
:state=1,random=60:rotatetoplr
:state=1,waypointstop,animate=1,rotatetotarget,resethead,state=4
:state=1,noiseheard=5:rotateheadrandom=85

:state=2:waypointstop,rotatetoplr,state=3
:state=3:animate=1,waypointstart,state=0

:state=4,plrcanbeseen=46:
:state=4,random=20:animate=2,waypointstart,state=1

;End of Script


Could anyone here show me what I have done wrong? I'm just looking to write a normal pace script so the entity can follow waypoints - thats all!
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 29th Nov 2007 04:51
In this block of code:



The second line, you can see that you ended it with just a colon... that's bad programming, man. If you don't want that line to do anything under those conditions, then just delete the whole line.

Also, the fifth line... doesn't have an "action colon". If you don't know what I'm talking about, you should take a look at my tutorials located on this board titled "A Complete Newbs Guide to Scripting".

You are also lacking actions for this line:



Again, if you don't want anything to happen under those conditions, just delete the line.


Hope that gets things rolling for you. I would really like to see more scripters out there.


The one and only,
~PlystirE~

Urlforce:
Dude, I'd rather be declared a dbpro noob than an fpsc legend any day!

Login to post a reply

Server time is: 2024-11-24 02:04:19
Your offset time is: 2024-11-24 02:04:19