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 / Waypoint with pause at each point.

Author
Message
raymondlee306
15
Years of Service
User Offline
Joined: 24th Oct 2009
Location: Ohio
Posted: 14th Oct 2010 01:57 Edited at: 14th Oct 2010 01:58
I'm working on a script to make a character follow a way point system, but stop and pause for a predetermined amount of time before proceeding to the next point. After reading every timer and way point thread I could find, I decided to try to modify the stock follow.fpi. However the characters just walk from point to point with no pause like the original. Here is my attempt so far, can someone tell me what I'm doing wrong please.

;Artificial Intelligence Script

;Header

desc = Follow Waypoints and 3 second pause at each

;Triggers

:waypointstate=0:animate=2,waypointstart,timerstart
:waypointstate=3,timergreater=30000:animate=2,waypointnext,timerstart
:waypointstate=4,timergreater=30000:animate=2,waypointrandom
:waypointstate=5:animate=2,waypointreverse

;End of Script
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 14th Oct 2010 22:26
Don't start the timer when the entity starts walking, you will want to start the timer when they arrive at a waypoint, then wait for the determined amount of time before executing "waypointnext" or "waypointrandom".

This can be done by jumping to another state when the waypointstates are reached, and having that state waiting for the timer to reach the desired time.


The one and only,


Login to post a reply

Server time is: 2024-11-24 19:46:27
Your offset time is: 2024-11-24 19:46:27