Looking to make a code for a monster that whenever it notices a target at a higher elevation either wall runs (if it detects a wall) or simply leaps upwards towards the target and tries to strike, making for great agile enemies who will target players/other monsters even when they seem beyond it's range.
This may be useful in making ninja-like custom monsters or monsters that are melee based that can't reach the player due to height elevation. Anyone have an idea how to handle this? Maybe a custom monster that already does this? (Or close to it.)
Monsters that Wall Jump/Wall Run towards Target [WIP]
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
-
Psychojack88
- Posts: 54
- Joined: Sat May 07, 2022 10:12 pm
- Graphics Processor: nVidia (Modern GZDoom)
Monsters that Wall Jump/Wall Run towards Target [WIP]
Last edited by Psychojack88 on Tue Oct 28, 2025 12:40 pm, edited 1 time in total.
-
Psychojack88
- Posts: 54
- Joined: Sat May 07, 2022 10:12 pm
- Graphics Processor: nVidia (Modern GZDoom)
Re: Monsters that Wall Jump/Wall Run towards Target [UNRESOLVED/WIP]
Okay so far I am thinking of simply using a temporary FLOAT tag. Can I change this at will using the A_ChangeFlag function in ZScript? If not, how can I temporarily make an actor float during a state in ZScript. I think that alone would be the main foundation to at least maybe make this work.
-
Psychojack88
- Posts: 54
- Joined: Sat May 07, 2022 10:12 pm
- Graphics Processor: nVidia (Modern GZDoom)
Re: Monsters that Wall Jump/Wall Run towards Target [WIP]
Was able to get my Daisy Eternal mod jumping towards an enemy based on elevation (z-height). If they're higher than her somewhere, she jumps, if not then she acts regular. There's a hard limit for the jump at the moment but this can probably be altered later on Zscript to be more dynamic and adapted for different enemies. Not perfect but it does the job well enough to be really useful despite being a melee-intended companion.
-
Heisanevilgenius
- Posts: 104
- Joined: Wed Dec 15, 2021 8:38 pm
- Graphics Processor: nVidia (Modern GZDoom)
Re: Monsters that Wall Jump/Wall Run towards Target [UNRESOLVED/WIP]
In Zscript, all you have to do is put bFLOAT=true inside brackets.Psychojack88 wrote: ↑Fri Oct 24, 2025 11:26 am Okay so far I am thinking of simply using a temporary FLOAT tag. Can I change this at will using the A_ChangeFlag function in ZScript? If not, how can I temporarily make an actor float during a state in ZScript. I think that alone would be the main foundation to at least maybe make this work.
Eg:
Code: Select all
TROO A 1 {
bFLOAT=true;
}
-
Heisanevilgenius
- Posts: 104
- Joined: Wed Dec 15, 2021 8:38 pm
- Graphics Processor: nVidia (Modern GZDoom)
Re: Monsters that Wall Jump/Wall Run towards Target [WIP]
I can think of one way that an enemy can "detect" a wall but it's a little hacky and a lot of work. You have the monster fire two invisible projectiles to their left and right that disappear if they travel more than a short distance. If the projectiles collide with something, you can have separate states depending on what they hit, so you can determine whether or not they hit a wall. If the projectile hits a wall, it sends a signal back to the monster (whether it be by giving inventory to the monster or setting a variable or whatever). Then you use A_ChangeVelocity to move towards that wall as it moves towards you so it will stick to it. You'll have to have the monster keep launching projectiles to make sure the wall doesn't abruptly end.
Maybe there's an easier more direct way but that's what I think of.
Maybe there's an easier more direct way but that's what I think of.