Having a Small Problem with A_SpawnItemEX

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
Eriance
Posts: 150
Joined: Wed Mar 29, 2006 19:36
Location: Everywhere and nowhere
Contact:

Having a Small Problem with A_SpawnItemEX

Post 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.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

You have to specify a vertical momentum with A_SpawnItemEx. This is not inherited from the parent projectile.
User avatar
Eriance
Posts: 150
Joined: Wed Mar 29, 2006 19:36
Location: Everywhere and nowhere
Contact:

Post 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.
User avatar
TheDarkArchon
Posts: 1000
Joined: Wed Jul 06, 2005 11:58
Location: What's that fucking smell
Contact:

Post by TheDarkArchon »

In doom, the vertical direction = the Z-axis.
Locked

Return to “GZDoom”