Args[] expression is not working in an anonymous function
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Args[] expression is not working in an anonymous function
Just what the title says: Args[] expression is not working in an anonymous function!
- Attachments
-
- Args_test.zip
- (1.6 KiB) Downloaded 26 times
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49056
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Args[] expression is not working in an anonymous functio
This is not surprising because CustomInventory state chains use the player as its caller. So you are checking the player's args.
To get around this, you have to use ZScript where you can access the item via the 'invoker' pointer. In DECORATE this cannot be done.
To get around this, you have to use ZScript where you can access the item via the 'invoker' pointer. In DECORATE this cannot be done.
Re: Args[] expression is not working in an anonymous functio
Thank You for pointing me in the right direction then! I found this page which describes this : https://zdoom.org/wiki/Using_pointers_in_ZScript