Page 1 of 1

Having a Small Problem with A_SpawnItemEX

Posted: Tue Nov 06, 2007 23:38
by Eriance
Since Zdoom forums is being moved, I'll have to ask this non-GZdoom only question here.

I'm having some small problems macking a projectile split into other projectiles that fly in the general direction as the parent-projectile. It works fine if i'm not aiming up or down, however when I aim the weapon up or down, when the missiles split it just fires ignoring the parent's pitch. here's a screenshot of what I mean:

Image

I shot from the upper right corner of the screenshot aiming slightly downwards. As you can see, as the small missiles are fired from the bigger ones, they ignore the pitch of the original missiles and just fly horizontally.

Here's the decorate:

[spoiler]ACTOR RazorShot1
{
Radius 4
Height 8
Speed 50
Damage 8
PROJECTILE
Damagetype "Bone"
+THRUGHOST
+RIPPER
DeathSound "weapons/glahit"
States
{
Spawn:
RFX1 PPPPPPPP 1 Bright A_SpawnItemEx("BoneTrail",0,0,0,0,0,0,0,128,0)
NULL AAAAAAAA 0 A_SpawnItemEx("RazorShot2",0,0,0,25,random(-6,6),random(-3,3),0,0,0)
stop
Death:
RFX1 L 0 Bright A_SetTranslucent(0.67,1)
RFX1 LMNO 4 Bright
stop
}
}

ACTOR RazorShot2
{
Radius 2
Height 4
Speed 35
Damage 1
PROJECTILE
Damagetype "Bone"
+THRUGHOST
DeathSound "weapons/thornx"
States
{
Spawn:
RFX1 A 1 Bright A_SpawnItemEx("RazorTrail",0,0,0,0,0,0,0,128,0)
loop
Death:
RFX1 G 0 Bright A_SetTranslucent(0.67,1)
RFX1 GHIJCDEF 3 Bright
stop
}
}[/spoiler]

Is there any way to fix this problem? Cuz my weapon can't really aim up or down at the moment.

Posted: Wed Nov 07, 2007 9:25
by Graf Zahl
You have to specify a vertical momentum with A_SpawnItemEx. This is not inherited from the parent projectile.

Posted: Tue Nov 13, 2007 18:51
by Eriance
When you mean Verticle momentum, I assume that's the Ymomentum? or is it the Z? Either way, i already have those on "random(#,#)" and it didn't work.

Posted: Thu Nov 15, 2007 14:38
by TheDarkArchon
In doom, the vertical direction = the Z-axis.