Page 1 of 1
Missile "Tail" Question.
Posted: Sun May 07, 2006 1:34
by solarsnowfall
Code: Select all
Actor RedGlowTail
{
PROJECTILE
+NoClip
RenderStyle Add
Scale 0.25
States
{
Spawn:
RGLW A 1 Bright
RGLW B 1 Bright A_SetTranslucent(0.85, 1)
RGLW C 1 Bright A_SetTranslucent(0.7, 1)
RGLW D 1 Bright A_SetTranslucent(0.55, 1)
RGLW E 1 Bright A_SetTranslucent(0.4, 1)
RGLW F 1 Bright A_SetTranslucent(0.25, 1)
RGLW G 1 Bright A_SetTranslucent(0.1, 1)
RGLW H 1 Bright A_SetTranslucent(0.05, 1)
Stop
}
}
That works fine with A_SpawnItem() in a projectile as the tail. If I try to do it with A_CustomMissile(), or A_MissileAttack (with it defined as the MissileType) it doesn't work. What gives? Bare in mind, this is a projectile that is put in motion by scripts, so it would use Spawn() or Thing_Projectile().
Posted: Sun May 07, 2006 8:26
by Phobus
Isn't it nescassary to have a target in order to use those two code pointers?
Posted: Sun May 07, 2006 9:26
by Graf Zahl
Indeed it is. But projectiles launched by scripts use the map spot as their originator (target.) In any case, these functions are not designed to spawn projectile tails, even if many people did that.
Posted: Sun May 07, 2006 17:55
by solarsnowfall
The only reason I looked for an alternate for A_SpawnItem() was because the tail was being offset by quite a bit when the projectile was being spawned via ACS. If I specifiy a small offset eg A_SpawnItem("RedGlowTail", 1, 0, 0) then the tail is only offset by one unit, and it doesn't look so bad, but it's stull not perfect.
Posted: Sun May 07, 2006 18:15
by Graf Zahl
With the next version you can use fractional numbers as offsets. 0 is still the default for 'don't stick in the spawner' though.
Posted: Sun May 07, 2006 23:03
by Eriance
solarsnowfall wrote:The only reason I looked for an alternate for A_SpawnItem() was because the tail was being offset by quite a bit when the projectile was being spawned via ACS. If I specifiy a small offset eg A_SpawnItem("RedGlowTail", 1, 0, 0) then the tail is only offset by one unit, and it doesn't look so bad, but it's stull not perfect.
Put all blank frame before the actual frames of the puff-actor(your tail). This way, when the tail is spawn, there is a duration there the tail is inivsable. To better explain it. her'es an example one of my projectile tail actors:
[spoiler]ACTOR RedPuff
{
Radius 0
Height 0
Speed 0
Scale 1.0
PROJECTILE
RENDERSTYLE ADD
ALPHA 0.85
States
{
Spawn:
NULL A 3 Bright <-----This frame is blank
RPUF ABCDE 3 Bright <----When the tail actually appears graphically
Stop
}
}[/spoiler]
This is the best method that I know to correct the offset. Change the duration of the blank frame according to the tail's sprite size and speed of the projectile. 3-5 works pretty good, IMO.
Posted: Mon May 08, 2006 1:23
by solarsnowfall
Well I can actually use aim mode 2 in A_CustomMissile, which doesn't require a target. I just didn't think of it at the time.
One question, and one comment. NULL, your blank frame, should be TNT1. That's the standard. Why would you set a scale of 1.0?
Posted: Mon May 08, 2006 1:34
by Eriance
solarsnowfall wrote:Well I can actually use aim mode 2 in A_CustomMissile, which doesn't require a target. I just didn't think of it at the time.
One question, and one comment. NULL, your blank frame, should be TNT1. That's the standard. Why would you set a scale of 1.0?
You should be able to if yoy use A_SpawnItem. This is just so the thing isn't offsetted. The I used the null sprite because this stuff was made originall for EDGE. I moved it to Zdoom but didint know there was a TNT1. Does it really matter what the name is? The Scale 1.0 thing is just there for no reason. I forget to delete, and seeing how it doesnt mess up anything, there is no point.
Posted: Mon May 08, 2006 1:47
by solarsnowfall
I don't see how adding a blank delay would correct for the offset. The problem I was having was with falling or raising projectiles, not ones moving strictly horizontally. The tail was being drawn off to one side. Using A_CustomMissile with aim mode 2 works perfectly. As far as the NULL v TNT1 thing goes, all I know is wiser people than I have said TNT1 is what should be used in zdoom.
Posted: Mon May 08, 2006 8:34
by Graf Zahl
The difference between TNT1 and any other empty sprite is that TNT1 is discarded right at the base of the sprite renderer. Anything else goes down the entire pipeline and is actually being rendered.
Posted: Mon May 08, 2006 10:32
by MartinHowe
So basically, TNT1, is a hangover from vanilla doom? Or is it called that because TeamTNT invented it (e.g., during the development of BOOM)?
Are we to take it that ZDoom officially defines TNT1 as always being an empty sprite that can be used for a blank sprite werever needed? That's certainly how Randy treats it in the source code, but is there any formal confirmation of this by Randy anywhere? What would (G)ZDoom do if anybody overrode it in a PWAD?
Posted: Mon May 08, 2006 11:22
by Graf Zahl
TNT1 was introduced by Boom for objects that needed to be invisible but for certain reasons couldn't use the only vanilla means to create something invisible.
And yes, ZDoom officially defines TNT1 as an invisible sprite that can be used where needed. The internal actor definitions are doing that themselves. TNT1 cannot be overridden. It is always invisible.
Posted: Mon May 08, 2006 18:30
by Eriance
solarsnowfall wrote:I don't see how adding a blank delay would correct for the offset. The problem I was having was with falling or raising projectiles, not ones moving strictly horizontally. The tail was being drawn off to one side. Using A_CustomMissile with aim mode 2 works perfectly. As far as the NULL v TNT1 thing goes, all I know is wiser people than I have said TNT1 is what should be used in zdoom.
when you mean offset, do you mean that the thing is spawned infront of the actor? or am I misunderstanding? Fiz if that is the case, adding a blank frame does fix it (so it appears) because while the smoke trial is invisable, the projecile has moved passed it. So when it appears, the smoke strail actor is behind the projectile, making it look like it's coming out of the end.