Stationary monsters that stand and attack?

Archive of the old editing forum
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.
Locked
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Stationary monsters that stand and attack?

Post by Hidden Hands »

There is one enemy in my game that is supposed to stand in a single spot and repeatedly shoot projectiles at you. However when the player is out of site, this monster tends to follow them or move to get a better shot. How can I prevent this? I need the monster to not move at all except for animations of dying, pain and attacking. No walking at all. How can I do this please?

Thanks in advance.
User avatar
Voros
Posts: 151
Joined: Fri Feb 03, 2017 11:47 pm

Re: Stationary monsters that stand and attack?

Post by Voros »

This is probably stupid, but you could make the firing state jump to the idle state, which in turn would jump to the firing state directly.

I haven't dealt with monsters, yet. Just weapons so don't take my word for it.
User avatar
phantombeta
Posts: 2088
Joined: Thu May 02, 2013 1:27 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Brazil

Re: Stationary monsters that stand and attack?

Post by phantombeta »

Change the speed property to 0, and make them not move in the Spawn state animation.
However, I *think* they might still turn like they do when walking... I have no idea, though, never messed around with immobile monsters myself.
User avatar
Popsoap10
Posts: 60
Joined: Thu May 26, 2016 6:47 pm

Re: Stationary monsters that stand and attack?

Post by Popsoap10 »

You can do it 2 ways:

Code: Select all

Actor StationaryTurningImp : DoomImp
{ 
    Speed 0
    States 
    { 
         See: 
              TROO AABBCCDD 3 A_Chase
              Loop 
    }  
}
Or

Code: Select all

Actor StationaryNonTurningImp : DoomImp
{ 
    States 
    { 
         See: 
              TROO AABBCCDD 3 A_Chase("Melee", "Missile", CHF_DONTMOVE)
              Loop 
    }  
}
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Re: Stationary monsters that stand and attack?

Post by Hidden Hands »

Worked like a charm. Thank you so much, everyone. So much appreciated.

:)
Locked

Return to “Editing (Archive)”