[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.
Sir Cyril Fudgelot
Posts: 16
Joined: Wed Mar 24, 2010 11:34 pm
Location: Dead on the field of Caramel.

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

Post by Sir Cyril Fudgelot »

Sample wad included. The imp is a shockwave imp, kind of like the one on the wiki example, but shoots his fireballs in a spiral instead of all at once. The BFG is an altered BFG, and uses the same code (basically) as the shockwave imp.

Also,this might be related: I tried using a user variable in a homing missile the other day to affect how well the missile homes. The missile ended up not homing at all. I'll "generically" it and put up a sample wad later on.
Attachments
BFGDemo2.wad
Wad with my decorate code incorporated.
(1.95 KiB) Downloaded 127 times
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 »

Huh... That is odd indeed...
Sir Cyril Fudgelot
Posts: 16
Joined: Wed Mar 24, 2010 11:34 pm
Location: Dead on the field of Caramel.

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

Post by Sir Cyril Fudgelot »

Any idea what's going on? Is there something wrong with my code, or is this an honest bug?
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 »

Hopefully Randy will take a look into this, but I'm going to try and set up a test example myself to ensure it's doing it's actions right...
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 »

I am also having a lot of trouble getting this feature to work. I'm not sure if I am doing it wrong or right.

Assuming the recent change to the user variable system (calling it from an inventory will refer to the item that called it; not the player), this little file I put together SHOULD work... but it isn't.

See http://forum.zdoom.org/viewtopic.php?f= ... 99#p487099 for demo file.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

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

Post by NeuralStunner »

Shouldn't they have a "scope" similar to ACS variables?

1. Variables defined in the PlayerPawn Actor would be available to it and all Inventory/Weapons carried.
2. Ones defined in an Inventory/Weapon Actor would be accessible only to that actor itself.
3. In case of an identical name defined in both a PlayerPawn-level Variable and an Inventory-level one, the Inventory version would take precedence, but only reference its own and not the PlayerPawn one.

I've been using Args[] lately, after hearing about this... :|
Guest

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

Post by Guest »

Where does args[] look when used on a weapon?
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

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

Post by NeuralStunner »

Priscilla Dettinglotch wrote:Where does args[] look when used on a weapon?
After a quick test, I find it uses the owning PlayerPawn's Args[]. Unless it is still on the map, in which case I'm sure it has its own.
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 »

Well I've tried everything I could and I'm convinced this is a bug...
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 »

Welp... Fuck. Same here. It's just not working. I pray Randy comes back here some time and takes a look into it again.
Sir Cyril Fudgelot
Posts: 16
Joined: Wed Mar 24, 2010 11:34 pm
Location: Dead on the field of Caramel.

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

Post by Sir Cyril Fudgelot »

It's been quite a while by this point. Would bumping to ask what the status on this be appropriate? Or am I about to get banned for harassing the programmers?
User avatar
Shadelight
Posts: 5113
Joined: Fri May 20, 2005 11:16 am
Location: Labrynna

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

Post by Shadelight »

Bumping a month old topic is okay. It's when you do it when it's not even two or three days old is when it's a bad idea.
User avatar
Borg
Posts: 56
Joined: Sun Jun 22, 2008 12:00 am

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

Post by Borg »

Well.. AFAIU everything is okey. You just dont get how decorate is run in some cases.
The most weapon states (like Fire/AltFire/Reload) are run in context of PlayerPawn actor.
So, if you want to use some vars there, you should rather declare them in PlayerPawn.
Thats all.. It should work.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

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

Post by NeuralStunner »

Borg wrote:Well.. AFAIU everything is okey. You just dont get how decorate is run in some cases.
We know more than you seem to think.
Borg wrote:The most weapon states (like Fire/AltFire/Reload) are run in context of PlayerPawn actor.
Of course.
Borg wrote:So, if you want to use some vars there, you should rather declare them in PlayerPawn.
Did you even read the thread? That was tried by multiple users, with the same result.
Borg wrote:Thats all.. It should work.
It should work, but it doesn't - hence the bug report.
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

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

Post by randi »

I think you'll have to wait for scripting so you can unambiguously specify which object's members you want to access.
Post Reply

Return to “Closed Bugs [GZDoom]”