A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Moderator: GZDoom Developers

Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Post by Edward-san »

This must be updated with the new acs functions and the new actor position code, because it won't merge/compile right now:

Code: Select all

/home/edward-san/zdoom/trunk/src/thingdef/thingdef_codeptr.cpp:2661:32: error: 
      no member named 'x' in 'AActor'
                P_SpawnParticle(xoff + self->x, yoff + self->y, zoff + s...
                                       ~~~~  ^
/home/edward-san/zdoom/trunk/src/thingdef/thingdef_codeptr.cpp:2661:48: error: 
      no member named 'y' in 'AActor'
                P_SpawnParticle(xoff + self->x, yoff + self->y, zoff + s...
                                                       ~~~~  ^
/home/edward-san/zdoom/trunk/src/thingdef/thingdef_codeptr.cpp:2661:64: error: 
      no member named 'z' in 'AActor'
  ...P_SpawnParticle(xoff + self->x, yoff + self->y, zoff + self->z, xvel, yv...
                                                            ~~~~  ^
3 errors generated.
User avatar
Major Cooke
Posts: 8193
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Post by Major Cooke »

I could fix it for edward850 if he's busy.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49130
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Post by Graf Zahl »

No need to. That self->Vec3Offset(xoff, yoff, zoff) and then passing the 3 components to the function is a one minute issue.

But since my last post everybody still seems to weasel around a decision. So what's up? I think of all the pending submissions this is one of the most useful and least invasive ones so it's a prime candidate for immediate inclusion.
User avatar
Major Cooke
Posts: 8193
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Post by Major Cooke »

I say it's fine as it is. Edward decided to keep it as it is too.
edward850 wrote:It kind of melted over the Christmas holidays when I was stuck with my laptop. I was going to try and set everything up with variance variables but it quickly become too bloated as well (which seems to be the problem with most ideas), especially if you only wanted to spawn 1 particle at a time.
The way I see it at the moment, it shouldn't matter as is. As long as it's named A_SpawnParticle (which it is), if a good idea comes in the future, you still have room for a plural A_SpawnParticles. :P
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49130
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Post by Graf Zahl »

Agreed.
User avatar
StrikerMan780
Posts: 486
Joined: Tue Nov 29, 2005 2:15 pm
Graphics Processor: nVidia with Vulkan support

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Post by StrikerMan780 »

A_SpawnParticles(count, minx, miny, minz, maxx, maxy, maxz, minvelx, minvely, minvelz, maxvelx, maxvely, maxvelz, color, lifetime, fullbright, startalpha, size, fadestep, accelx, accely, accelz)

Makes the number of parameters pretty large, but this is what I propose for spawning multiple particles. Being able to specify min/max offsets and velocities. (If someone already mentioned this, I apologize. In a hurry at the moment.)
Gez
 
 
Posts: 17922
Joined: Fri Jul 06, 2007 3:22 pm

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Post by Gez »

IMO the color (or type) should be first, the count second, and all the other params should have workable default. Putting color, as you do, as the 14th parameter is not good.
D2JK
Posts: 545
Joined: Sat Aug 30, 2014 8:21 am

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Post by D2JK »

minx, miny, minz, maxx, maxy, maxz, minvelx, minvely, minvelz, maxvelx, maxvely, maxvelz
I think there is no need for separate min/max parameters; frandom() should suffice here.

Other than that, I agree with having more options.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49130
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Post by Graf Zahl »

D2JK wrote:
minx, miny, minz, maxx, maxy, maxz, minvelx, minvely, minvelz, maxvelx, maxvely, maxvelz
I think there is no need for separate min/max parameters; frandom() should suffice here.

No, it wouldn't. You do not want one random number for all, you want different numbers, and for those you need the min and max.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49130
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Post by Graf Zahl »

Looking through this, I think I'm going to change the alpha parameter of the DECORATE version from byte to float for consistency. So please no hurry with the docs... ;)
User avatar
Hellser
Global Moderator
Posts: 2726
Joined: Sun Jun 25, 2006 4:43 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Citadel Station

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Post by Hellser »

I can't wait to use this. Oh, this is going to be so deliciously good!
User avatar
Major Cooke
Posts: 8193
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Post by Major Cooke »

Graf Zahl wrote:Looking through this, I think I'm going to change the alpha parameter of the DECORATE version from byte to float for consistency. So please no hurry with the docs... ;)
What about a relative flag? Something to make it like A_SpawnItemEx's relativity, or akin to A_ChangeVelocity's RELATIVE flag.
D2JK
Posts: 545
Joined: Sat Aug 30, 2014 8:21 am

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Post by D2JK »

No, it wouldn't. You do not want one random number for all, you want different numbers, and for those you need the min and max.
Your comment was a bit hard to decipher at first, but I assume you are referring to each random value being randomized only once per function call. If so, I see what you mean.
User avatar
edward850
Posts: 5886
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Post by edward850 »

Graf Zahl wrote:Looking through this, I think I'm going to change the alpha parameter of the DECORATE version from byte to float for consistency. So please no hurry with the docs... ;)
You didn't want to do this with fadestep as well, which directly relates to the starting alpha?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49130
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)

Post by Graf Zahl »

Does it? Can you explain what this parameter is there for?

Return to “Closed Feature Suggestions [GZDoom]”