Quick question about waypoint set

I think I have done this before, but can’t remember quite how I did it, or if it was by mistake that time. I have a waypoint set for a creature. I would like to break that waypoint set with a script. What I mean is: After that script, I don’t want the creature to be able walk that waypoint set again.

Do you just use AssignCommand(oCreature, ClearAllActions()); for that, or will it resume it’s waypoint path after the ClearAllActions at some point?

Nevermind. I don’t want that anymore. I found another way to do the scene I’m working with. Still, it would have been interesting to know how this is done…


the tags of walkwaypoints are based on the tag of the creature(s) that walk them.

so various things are possible. Change the tag of the creature, such that it follows one set of waypoints or another. Or if you don’t want to change the tag of the creature, loop through the waypoints and set their tags appropriately. Or have dummy waypoints that the real walkwaypoints spawn and despawn at …

it’d be fiddly keeping track of waypoints

Ideally the WalkWayPoints algorithm would take a “tag_override” parameter but i don’t think it does.

another idea is to override its HB script with one that doesn’t call WalkWayPoints() ← I think that is why a creature resumes walking after ClearAllActions()

Have it ‘walk’ another set by repeated ActionMoveToObject() calls. Once that’s done, re-assign the regular HB script so that it goes back to the regular routine.

1 Like
	This will make a character stop (or start) walking their waypoint set.

#include "x0_i0_walkway"

void main()
	object oNPC = GetNearestObjectByTag("walker_tag");
	int n = FALSE;	// set to TRUE to start walking again
	SetWalkCondition(NW_WALK_FLAG_CONSTANT, n, oNPC);
	AssignCommand(oNPC, ClearAllActions());	  

Thanks for the answers. Then I know what to do next time this happens.

Very useful to know. I often cower in fear of waypoint stuff!