A_Wander

From ZDoom Wiki

Jump to: navigation, search

A_Wander

(no parameters)


Makes the actor wander around aimlessly, used by Strife's peasants. It will not attack players or other targets when calling this function, unlike A_Chase. A_Wander does nothing when the actor calling it has the STANDSTILL flag set.

Examples

Here's an example of an Imp that wonders around randomly looking for players.

actor ImpScout : DoomImp
{
States {
  Spawn:
    TROO AA 3 A_Wander
    TROO A 0 A_Look
    TROO BB 3 A_Wander
    TROO B 0 A_Look
    TROO CC 3 A_Wander
    TROO C 0 A_Look
    TROO DD 3 A_Wander
    TROO D 0 A_Look
    loop
 }
}

A_Look has to repeatedly be called to check for players while it's wandering around.

Personal tools