What's the purpose of this?
Maybe you want to study how A_Chase works in GZDoom, or maybe A_LookEx but without having to look up the original source code?
Or maybe you want to create your own A_Chase on top of the original one?
Here is a collection of action functions that aren't exposed to ZScript, but can be ported.
Note: I'm trying my best to retain the way the original code is written along with comments, so it shouldn't be confusing when compared to C++ implementation
A_Chase: https://github.com/Kizoky/CPPtoZScript/ ... _Chase.txt
A_LookEx: https://github.com/Kizoky/CPPtoZScript/ ... LookEx.txt
A_Wander: https://github.com/Kizoky/CPPtoZScript/ ... Wander.txt
Alternatively you can look below for downloading them
Credits: phantombeta for originally porting A_Chase in the first place
[ZScript] Ported Action functions
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
Got a cool project idea but nothing else? Put it in the project ideas thread instead!
Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.
Please read the full rules for more details.
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
Got a cool project idea but nothing else? Put it in the project ideas thread instead!
Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.
Please read the full rules for more details.
- Kizoky
- Posts: 291
- Joined: Mon Nov 14, 2011 9:59 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: Around weirdos, I'm the biggest weirdo among them
- Contact:
[ZScript] Ported Action functions
- Attachments
-
- A_Chase.txt
- (8.84 KiB) Downloaded 106 times
-
- A_Wander.txt
- (1023 Bytes) Downloaded 75 times
-
- A_LookEx.txt
- (3.94 KiB) Downloaded 73 times
Last edited by Kizoky on Thu Apr 08, 2021 11:30 pm, edited 5 times in total.
- FranjeGueje
- Posts: 4
- Joined: Fri Feb 05, 2021 4:12 am
- Graphics Processor: ATI/AMD (Modern GZDoom)
- Location: Spain
- Contact:
Re: [ZScript] Ported A_Chase
Thank you, very useful for me.
I am developing a new behavior and I need information about "Chase" and about "SetGoal".
I am developing a new behavior and I need information about "Chase" and about "SetGoal".
- Xtyfe
- Posts: 1490
- Joined: Fri Dec 14, 2007 6:29 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
Re: [ZScript] Ported A_Chase
Ohhh man this is unbelievably useful! How hard would it be to do a port of A_LookEx?
- Kizoky
- Posts: 291
- Joined: Mon Nov 14, 2011 9:59 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: Around weirdos, I'm the biggest weirdo among them
- Contact:
Re: [ZScript] Ported A_Chase
Depends on if every function in A_LookEx is available (exposed to) in ZScriptXtyfe wrote:Ohhh man this is unbelievably useful! How hard would it be to do a port of A_LookEx?
From the looks of it it's possible to port it, it's in p_enemy.cpp (at line 1874)
Edit:
I ported A_LookEx, here's a link for it here: https://github.com/Kizoky/CPPtoZScript/ ... LookEx.txt
Hopefully I didn't mess up anything with it
- Xtyfe
- Posts: 1490
- Joined: Fri Dec 14, 2007 6:29 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
Re: [ZScript] Ported Action functions
Wow, using redefined functions vs the hacky and probably unsupported method I was using before is so much easier. Thank you for this.
- Xtyfe
- Posts: 1490
- Joined: Fri Dec 14, 2007 6:29 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
Re: [ZScript] Ported Action functions
I finally got a chance to try these out and without making my own modifications, they don't work as-is. When adding them to an actor, they don't seem to work without any arguments set like the regular functions do. For example, when I do set arguments for A_PortedLookEx, it errors out when using "See" for the seestate variable. If I use seestate instead it does work but monsters wont react to seeing me, only hearing me. A_PortedChase does work without arguments but monsters wont attack me.
- Kizoky
- Posts: 291
- Joined: Mon Nov 14, 2011 9:59 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: Around weirdos, I'm the biggest weirdo among them
- Contact:
Re: [ZScript] Ported Action functions
Ouch. There must be something that I screwed up accidentally, I'll look into it asapXtyfe wrote:I finally got a chance to try these out and without making my own modifications, they don't work as-is. When adding them to an actor, they don't seem to work without any arguments set like the regular functions do. For example, when I do set arguments for A_PortedLookEx, it errors out when using "See" for the seestate variable. If I use seestate instead it does work but monsters wont react to seeing me, only hearing me. A_PortedChase does work without arguments but monsters wont attack me.