Hope someone can help me.
I have an NPC who has a few waypoints he walks around. I have added a conversation tree with several PC replies such as "go to room A" and "got to room b", etc.
These rooms each have a waypoint of the NPC in them.
Now how do I connect these together to make the NPC go to a particular waypoint from the PC reply.
thanks
NPC go to waypoint from a convo reply
Moderator: Event DM
-
- Apprentice Scholar
- Posts: 689
- Joined: Fri Aug 27, 2004 9:12 pm
- Location: UK, Hertfordshire
-
- Team Member; Retired with Honors
- Posts: 1724
- Joined: Tue Nov 09, 2004 2:55 pm
- Timezone: GMT-6
- Location: St. Louis, MO
Depending on how the waypoints are setup, you can use ActionForceMoveToObject(object oObjectToMoveTo, int iRun, float fRange, float fTimeOut)
Use your waypoint as the object, set iRun to TRUE (if you want him to run) or FALSE (if you want him to walk), fRange is the distance (in meters) from the object your NPC will stop walking, and fTimeOut is the amount of time to try to reach the object before jumping to the point.
All you need to use is ActionForceMoveToObject(oWayPoint), this will make your NPC attempt to walk to the waypoint for 30 seconds before teleporting to it.
If you don't want him to teleport, but just fail to move to the point and stop, use ActionMoveToObject(oWayPoint).
Use your waypoint as the object, set iRun to TRUE (if you want him to run) or FALSE (if you want him to walk), fRange is the distance (in meters) from the object your NPC will stop walking, and fTimeOut is the amount of time to try to reach the object before jumping to the point.
All you need to use is ActionForceMoveToObject(oWayPoint), this will make your NPC attempt to walk to the waypoint for 30 seconds before teleporting to it.
If you don't want him to teleport, but just fail to move to the point and stop, use ActionMoveToObject(oWayPoint).
-
- Apprentice Scholar
- Posts: 689
- Joined: Fri Aug 27, 2004 9:12 pm
- Location: UK, Hertfordshire