MantisBT - Zandronum
View Issue Details
0003084Zandronum[All Projects] Bugpublic2017-04-23 13:072017-04-23 20:34
0003084: User Variables don't work on weapons
For User Variables to work on weapons it needs to be defined in the playerclass but if it's not defined in the weapon it will error out saying the var doesn't exist.

If you add the var to the weapon itself then the var will no longer work.
Have a user var on the player then try and check it inside a weapon using A_JumpIf
No tags attached.
Issue History
2017-04-23 13:07forrestmarkxNew Issue
2017-04-23 13:09forrestmarkxNote Added: 0017271
2017-04-23 13:11Torr SamahoNote Added: 0017273
2017-04-23 13:11Torr SamahoStatusnew => feedback
2017-04-23 13:29forrestmarkxNote Added: 0017275
2017-04-23 13:29forrestmarkxStatusfeedback => new
2017-04-23 15:00CutmanNote Added: 0017279
2017-04-23 17:33Torr SamahoNote Added: 0017285
2017-04-23 17:33Torr SamahoStatusnew => feedback
2017-04-23 20:34Edward-sanNote Added: 0017296

2017-04-23 13:09   
Hmm now that I read up on the wiki the only way for it to work on weapons is using GetUserVariable from ACS
Torr Samaho   
2017-04-23 13:11   
Please first check whether what you are trying to do works in GZDoom 1.8.6.
2017-04-23 13:29   
It does if I use ACS but sadly this doesn't help what I was trying to do. (Saving a ACS call in a user variable to reduce calls to the ACS function)
2017-04-23 15:00 [^]


        * The player itself must have the user variables. Defining the user variables is completely unnecessary on weapons as they are never stored.
        * Weapons may set the user variables on the player via DECORATE or ACS.

Unfortunate as it would be very handy, but they have to be defined in the playerclass if you want to use them.
Torr Samaho   
2017-04-23 17:33   
So sounds like this is not a bug of Zandronum 3.0 then, right?
2017-04-23 20:34   
AFAIR user variables can't be used reliably on weapons because of a bad implementation of Decorate (inherited from (G)Zdoom). ZScript fixes this, hence [WFZS].