Nevermind this wrote:I'm trying to make a monster alternate between standing still and walking, and the only way I know of to make this is by using A_ChangeFlag to switch +STANDSTILL on and off.
Unfortunately, +STANDSTILL doesn't seem to be one of the flags A_ChangeFlag can change. So before I start up a feature suggestion thread, is there anything else I need to know about that flag that would make it not work?
Monster moving and standing still
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Monster moving and standing still
Edit: Okay, I apparantly didn't know what +STANDSTILL did exactly. Is there a way to make a monster alternate between standing still (but still able to attack) and moving?
[wiki]A_Look2[/wiki] might help you. Check out the Strife peasants for example usage.
EDIT: An alternative method, probably closer to what you need, is to use [wiki]ACS_ExecuteAlways[/wiki] in the monster's DECORATE to stop the actor from moving, by changing its speed with [wiki]SetActorProperty[/wiki]. This would be best done with a random state jump.
Might be worth a shot? I haven't tested it, and you'll need GZDoom or the SVN of ZDoom.
EDIT: An alternative method, probably closer to what you need, is to use [wiki]ACS_ExecuteAlways[/wiki] in the monster's DECORATE to stop the actor from moving, by changing its speed with [wiki]SetActorProperty[/wiki]. This would be best done with a random state jump.
Code: Select all
States
{
Spawn:
TROO AB 4 A_Look
Loop
See:
TNT1 A 0 A_Jump(128, "Standstill")
Goto Move
Standstill:
TNT1 A 0 ACS_ExecuteAlways(100,0,0,0) // script sets actor's speed to 0
TROO AAAA 4 A_Chase
TNT1 A 0 A_Jump(128, "Move")
Goto Standstill+1
Move:
TNT1 A 0 ACS_ExecuteAlways(101,0,0,0) // script sets actor's speed to 1.0
TROO ABCD 4 A_Chase
TNT1 A 0 A_Jump(128, "Standstill")
Goto Move+1
Missile:
etc....