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 Product Chat / Waypoints and Enemies

Author
Message
JonnieR
16
Years of Service
User Offline
Joined: 9th Jul 2010
Location:
Posted: 29th Jul 2010 07:24
I worked out some waypoiunts just to try them out. I noticed that according to the the tutorial on waypoints you substitue the pace script for the main script. I don't understand how you get the enemy to stop walking and attack if you he is walking a waypoint route.

Is there another script that allows him to walk the waypoint route, but also attack the player if he comes in range?
ctm
21
Years of Service
User Offline
Joined: 25th Feb 2005
Location:
Posted: 29th Jul 2010 12:45 Edited at: 29th Jul 2010 12:53
Take a look at the pace script:

There you'll find this line:

:state=1,plrcanbeseen:settarget,state=2

Means that when the player can be seen he gets set as target (That's necessary because when he is not set as target the NPC can shoot the player but it cannot hurt him).
Further the state gets set to 2.

Now lets take a look at the line with state=2 as condition:

:state=2:waypointstop,rotatetoplr,state=3,shootplr

state=2 is true when plr can be seen (look at the first line i meantioned)

Then these actions a executed:
- NPC stops walking the waypoint route (waypointstop)
- NPC rotates to player (rotatetoplr)
- The shoot script gets called! (shootplr)
- state gets set to 3 (see below)

That means that there must be a shoot script attached in the NPC properties, else the NPC will only stand there and continue to rotate to player (look at the player) because of this line:
:state=3:animate=1,state=1

Hope that helps to understand the people scripts.

With v1.17 comes darkai and new scripts but it's not wasted time to try to understand the fpi scripts.
JonnieR
16
Years of Service
User Offline
Joined: 9th Jul 2010
Location:
Posted: 29th Jul 2010 19:32
Thanks for the response. I am getting better at reading scripts, but I know it will take practice.

Login to post a reply

Server time is: 2026-07-16 04:36:25
Your offset time is: 2026-07-16 04:36:25