Actor Flag, Can't move backwards.

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

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!)
Halarda
Posts: 4
Joined: Sun Mar 29, 2020 5:42 pm

Actor Flag, Can't move backwards.

Post by Halarda »

Hello.

I'm relatively new to doom modding and programing. Is there an Actor Flag that prevents a monster from moving backwards (Can only move sideways or forward towards the player).

Thanks for the help.
Heisanevilgenius
Posts: 72
Joined: Wed Dec 15, 2021 8:38 pm
Graphics Processor: nVidia (Modern GZDoom)

Re: Actor Flag, Can't move backwards.

Post by Heisanevilgenius »

https://zdoom.org/wiki/A_Chase

CHF_NORANDOMTURN might do what you're looking for. Beyond that what you're looking for might be very complicated.
Halarda
Posts: 4
Joined: Sun Mar 29, 2020 5:42 pm

Re: Actor Flag, Can't move backwards.

Post by Halarda »

Heisanevilgenius wrote: Thu Jan 23, 2025 6:43 pm https://zdoom.org/wiki/A_Chase

CHF_NORANDOMTURN might do what you're looking for. Beyond that what you're looking for might be very complicated.
hmm I'm trying to use CHF_NORANDOMTURN but I don't know how to implement the flag properly.

I'm trying
AA76 AABBCCDDEEFF 3 A_Chase(statelabel melee = '_a_chase_default', statelabel missile = '_a_chase_default', CHF_NORANDOMTURN);

how do you use this correctly?
Heisanevilgenius
Posts: 72
Joined: Wed Dec 15, 2021 8:38 pm
Graphics Processor: nVidia (Modern GZDoom)

Re: Actor Flag, Can't move backwards.

Post by Heisanevilgenius »

Code: Select all

AA76 AABBCCDDEEFF 3 A_Chase('_a_chase_default', '_a_chase_default', CHF_NORANDOMTURN);
Halarda
Posts: 4
Joined: Sun Mar 29, 2020 5:42 pm

Re: Actor Flag, Can't move backwards.

Post by Halarda »

Heisanevilgenius wrote: Thu Jan 23, 2025 8:41 pm

Code: Select all

AA76 AABBCCDDEEFF 3 A_Chase('_a_chase_default', '_a_chase_default', CHF_NORANDOMTURN);
This works pretty well. Thanks for the help. :D

Return to “Scripting”