Jump to content

Creature scripts and waypoints


Recommended Posts

I've been trying to edit the guard.txt creature script so that when the creature reaches its waypoint, a message in the text area appears.


However, I have tried over and over again, and I can't seem to get it to play the message at the right time.


I searched for a script that might have this, but I haven't found one.


Does anyone know how to do this?

Link to comment
Share on other sites

Have you tried something like:

if(dist_to_waypoint(ME,waypointNum) < someDist){    //print message}

in the START_STATE, where waypointNum is the number of the relevant waypoint and someDist is some small distance like 1 or 2?

(It's good to make things work in the case tht the creature can get close to a waypoint but can't reach it exactly, like if someone else is already standing on it.)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...