Re: A_SpawParticles (X,Y,Z,XYZSpeeds,Color)
Posted: Sat Dec 05, 2015 9:30 am
I agree with Ravick's original idea. Let's skip the whole sprite idea and stick with manipulating particles directly.
... next in the exhibit, we see ZDoom trying to do a circle.. out of a 2x2 pixel. Some others say, though.. that it is a square.Major Cooke wrote: - Shape
void SpawnParticle(fixed x, fixed y, fixed z, fixed velocityx, fixed velocityy, fixed velocityz, int color, byte lifetime[, bool fullbright = false[, byte startalpha = 255[, byte size = 1[, int fadestep = -1[, fixed accelx = 0.0[, fixed accely = 0.0[, fixed accelz = 0.0]]]]]]])[20:17:46] <Kyle873> Edward850
[20:17:48] <Kyle873> can I get that in ACS
[20:17:49] <Kyle873> please
[20:17:49] <Kyle873> please
[20:17:50] <Kyle873> please
[20:17:50] <Kyle873> please
[20:17:51] <Kyle873> please
[20:17:51] <Kyle873> please
[20:17:54] <Kyle873> please
[20:17:56] <Kyle873> please
Code: Select all
ACTOR DoomImpBall_Par : DoomImpBall replaces DoomImpBall
{
States
{
Spawn:
BAL1 AAAA 1 Bright A_SpawnParticle(Random2(3), Random2(3), Random(2, 6), frandom(-1.0, 1.0), frandom(-1.0, 1.0), frandom(-1.0, 1.0), "Red", Random(17, 70), true, 255, Random(1, 6), -1, 0, 0, frandom(0.1, 0.2))
BAL1 BBBB 1 Bright A_SpawnParticle(Random2(3), Random2(3), Random(2, 6), frandom(-1.0, 1.0), frandom(-1.0, 1.0), frandom(-1.0, 1.0), "Orange", Random(17, 70), true, 255, Random(1, 6), -1, 0, 0, frandom(0.1, 0.2))
Loop
Death:
BAL1 CCCCCCCC 0 Bright A_SpawnParticle(Random2(3), Random2(3), Random(2, 6), frandom(-1.0, 1.0), frandom(-1.0, 1.0), frandom(0.5, 1.0), "Red", Random(17, 70), true, 255, Random(3, 6))
BAL1 CCCCCCCC 0 Bright A_SpawnParticle(Random2(3), Random2(3), Random(2, 6), frandom(-1.0, 1.0), frandom(-1.0, 1.0), frandom(0.5, 1.0), "Orange", Random(17, 70), true, 255, Random(3, 6))
BAL1 CCCCCCCC 0 Bright A_SpawnParticle(Random2(3), Random2(3), Random(2, 6), frandom(-1.0, 1.0), frandom(-1.0, 1.0), frandom(0.5, 1.0), "Gray", Random(17, 70), false, 255, Random(3, 6))
BAL1 CDE 6 Bright
Stop
}
}
Code: Select all
script "nuke_effect" open
{
for(int y = -96.0; y <= 160.0; y+=64.0)
for(int x = -224.0; x <= 224.0; x+=64.0)
SpawnParticle(x+random(-32.0, 32.0), y+random(-32.0, 32.0), random(-16.0, 8.0), 0, 0, random(0.1, 1.0), 0x00FF00, 50, true);
delay(1);
restart;
}
Okay, we need vectors and structs and stuff in DECORATE, because the amount of arguments for this and A_SpawnItemEx is just absurd.edward850 wrote:[...]
A_SpawnParticle(fixed xoffset, fixed yoffset, fixed zoffset, fixed velocityx, fixed velocityy, fixed velocityz, color color, byte lifetime[, bool fullbright = false[, byte startalpha = 255[, byte size = 1[, int fadestep = -1[, fixed accelx = 0.0[, fixed accely = 0.0[, fixed accelz = 0.0]]]]]]])
[...]
I see what you did there. Graf means trusted programmers.Edward-san wrote:my approval.
Blzut3 wrote:The answers for how to create something elegant and user friendly and how to make something as flexible is possible are usually disjoint. Especially when you start with the premise of making a structure available via a function call. Perhaps someone can come up with a relatively simple interface to generate effects like those from P_DrawSplash? For example something like: A_ParticleSplash(count, ttl, x, y, z, angle, pitch, speed, scatter_dist, color1, color2="None", speed_spread=0, angle_spread=0, pitch_spread=0) Might need some refinement, but I guess the goal would be to do a decent emulation of the spark actor using the Active state.