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.
Stationary monsters that stand and attack?
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.
- Hidden Hands
- Posts: 1053
- Joined: Tue Sep 20, 2016 8:11 pm
- Location: London, England
- Contact:
Re: Stationary monsters that stand and attack?
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.
I haven't dealt with monsters, yet. Just weapons so don't take my word for it.
- 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?
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.
However, I *think* they might still turn like they do when walking... I have no idea, though, never messed around with immobile monsters myself.
Re: Stationary monsters that stand and attack?
You can do it 2 ways:
Or
Code: Select all
Actor StationaryTurningImp : DoomImp
{
Speed 0
States
{
See:
TROO AABBCCDD 3 A_Chase
Loop
}
}
Code: Select all
Actor StationaryNonTurningImp : DoomImp
{
States
{
See:
TROO AABBCCDD 3 A_Chase("Melee", "Missile", CHF_DONTMOVE)
Loop
}
}
- Hidden Hands
- Posts: 1053
- Joined: Tue Sep 20, 2016 8:11 pm
- Location: London, England
- Contact:
Re: Stationary monsters that stand and attack?
Worked like a charm. Thank you so much, everyone. So much appreciated.