[2.4.1] User variables in weapons have inconsistent owners.

Bugs that have been investigated and resolved somehow.

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.
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [2.4.1] User variables in weapons have inconsistent owne

Post by Nash »

ZzZombo wrote:
Phineas Pillylock wrote:I suggest to use something like A_JumpIf(owner.someVariable>0) (owner is actor owns the inventory item), A_JumpIf(target.someVariable>0), A_JumpIf(tracer.someVariable>0), A_JumpIf(master.someVariable>0) (self-descriptive), and let A_JumpIf(self.someVariable>0) to be performed directly on the actor that defined the action pointer. A_JumpIf(someVariable>0) should look first for owner.someVariable if used from an inventory item and if it is not found then look for self.someVariable otherwise just behave the same as self.someVariable. someVariable maybe not only user variable but any Decorate expression that makes sense there, such as ceilingz or health. Hope I wrote it clear.
Ye, Randy, isn't this is exactly what allows to specify what object to reference to?

Wow it's been four years. :O

Whatever is going to be done to address this, I hope it cleanly avoids messing up existing mods because I heavily use user variables and I don't know, I just feel like what I've done is so finnicky and fragile that the slightest change on the executable side might break my mod horribly... :3
User avatar
Major Cooke
Posts: 8212
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: [2.4.1] User variables in weapons have inconsistent owne

Post by Major Cooke »

Alright I've done some digging. Basically, this sets user variables the same way custominventory items do. I don't think it can be worked around either. It's basically down to: can set, cannot read. So only use user variables on the player actor itself if the jump states are there.

And I don't think there's any way to fix it, really.

I know for a fact those self. and master. bits, those are clearly WFDS.

In general, I think this can be closed as [Can't fix].

See this for more info.
Last edited by Major Cooke on Fri Jan 29, 2016 7:15 pm, edited 2 times in total.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [2.4.1] User variables in weapons have inconsistent owne

Post by Graf Zahl »

I concur with 'Can't fix'. With proper scripting this should be doable, but DECORATE is simply insufficient.
Post Reply

Return to “Closed Bugs [GZDoom]”