The "How do I..." Thread

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
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: The "How do I..." Thread

Post by NeuralStunner »

Ceeb wrote:Derp... Thanks NS.
There's that D word again. :laff: But you're welcome.
User avatar
Ceeb
Posts: 5125
Joined: Wed Jun 11, 2008 4:07 pm
Location: Castle Wut

Re: The "How do I..." Thread

Post by Ceeb »

So now, I'm implementing my upgraded Doom weapons in Resource. The way I intend for this to work is that when you get an upgraded version, it takes away the original, and any originals you come across simply provide some ammo, without the player collecting that weapon. The dilemma? How do I make the weapon check if the player has an upgraded version of it, and change to an ammo-only version? I'm hoping to do this without ACS, but I can if necessary...
User avatar
Ceeb
Posts: 5125
Joined: Wed Jun 11, 2008 4:07 pm
Location: Castle Wut

Re: The "How do I..." Thread

Post by Ceeb »

Another question, but a quick one I'm hoping someone can answer. Is it possible to user user vars with weapons? I've heard about problems with them and don't want to invest a few hours rewriting my weapons to find out it was for nothing.
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: The "How do I..." Thread

Post by NeuralStunner »

Ceeb wrote:Is it possible to user user vars with weapons?
It's possible, but they don't work quite right. You can use Args[], which affects the Player's - I can't think of many reasons to attach a special to a Player actor.
User avatar
Ceeb
Posts: 5125
Joined: Wed Jun 11, 2008 4:07 pm
Location: Castle Wut

Re: The "How do I..." Thread

Post by Ceeb »

Well, what doesn't quite work right? I don't, say, have multiplayer in my mods, so... If that's the problem...
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: The "How do I..." Thread

Post by NeuralStunner »

Ceeb wrote:Well, what doesn't quite work right?
ZDoom gets confused whether you're trying to reference a var on the Weapon or on the owning Player.
User avatar
Ceeb
Posts: 5125
Joined: Wed Jun 11, 2008 4:07 pm
Location: Castle Wut

Re: The "How do I..." Thread

Post by Ceeb »

Ah, crap. :( Guess I'll stick with inventory items.
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: The "How do I..." Thread

Post by NeuralStunner »

Again, Args[] still work, they can be used in the same ways as User Vars. ;)
User avatar
Ceeb
Posts: 5125
Joined: Wed Jun 11, 2008 4:07 pm
Location: Castle Wut

Re: The "How do I..." Thread

Post by Ceeb »

Hm... Alright then. I'll try that.
User avatar
Ceeb
Posts: 5125
Joined: Wed Jun 11, 2008 4:07 pm
Location: Castle Wut

Re: The "How do I..." Thread

Post by Ceeb »

Here's another one. Is it possible to add to a state jump in a jump function? What I mean is, it's legal to do this:

Code: Select all

TNT1 A 0
Goto NextState + 4
But when I try to do this...

Code: Select all

TNT1 A 0 A_Jump(128,"NextState" + 4)
or any variant thereof I simply get an error. Is there any way to do this?
User avatar
ChronoSeth
Posts: 1631
Joined: Mon Jul 05, 2010 2:04 pm
Location: British Columbia

Re: The "How do I..." Thread

Post by ChronoSeth »

Using the number of frames to skip ahead rather than the state to jump to, perhaps? (I don't remember if that can be used across multiple states though)
User avatar
Ceeb
Posts: 5125
Joined: Wed Jun 11, 2008 4:07 pm
Location: Castle Wut

Re: The "How do I..." Thread

Post by Ceeb »

ChronoSeth wrote:Using the number of frames to skip ahead rather than the state to jump to, perhaps? (I don't remember if that can be used across multiple states though)
It can, but I need to go backwards.
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: The "How do I..." Thread

Post by NeuralStunner »

Add another state label?
User avatar
Ceeb
Posts: 5125
Joined: Wed Jun 11, 2008 4:07 pm
Location: Castle Wut

Re: The "How do I..." Thread

Post by Ceeb »

NeuralStunner wrote:Add another state label?
Gwarh, this weapon is fucktardedly complex as it is. Although by that logic, I suppose one more state won't hurt. I'm off to the feature-suggestionmobile, however.
User avatar
Ceeb
Posts: 5125
Joined: Wed Jun 11, 2008 4:07 pm
Location: Castle Wut

Re: The "How do I..." Thread

Post by Ceeb »

Here's another one. In my deathmatch map, there's traps you can activate (turrets and such) and I need to be sure that the player who runs the script gets credit for the kills. Can I even do this?
Locked

Return to “Editing (Archive)”