You must be logged in to do that.

EntitySetWanderZone

EntitySetWanderZone
void EntitySetWanderZone(int entity)

Documentation

This function changes the specified entity's wander mode to Zone.

This function tells an entity to wander around within the confines of the zone it is currently standing in. Other zones will act like obstructions to it.

For the curious, no zone data is stored concerning this functionality; The entity just compares it's current zone to the zones of where it can move when it's thinking about moving.

This function is a part of a small family of Wander-mode effecting Entity functions, which includes: EntitySetWanderDelay, EntitySetWanderRect, EntitySetWanderZone, and EntityStop.

Example Usage

//let's pretend we're talking to Sor, Norse god of muscle fatigue!

void Talk_Sor() 
{
	//stop the entity so we can talk to him...
	EntityStop( event.entity );

	// Do the talking!
	//
	// TextBox( SOR_PRT, "Yeah yeah, well, I'm twice as Thor as he'll ever be.  Can I get a massage here now?" );

	//now that we're done talking, set the entity to wander-zone mode so he can wander around again.
	EntitySetWanderZone( event.entity ); 
}
Talkback

There are no talkbacks on this documentation page yet. Post the first?

Post a new comment?

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.