Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
Garbage

need help with gzdoom DECORATE

Question

I'm trying to make a rocket projectile that drops a weapon when it hits something, but it doesn't seem to be working. I put the DropItem flag, and I get no script errors on launch. But when fired, the rocket acts normally and doesn't drop anything. Help?

 

Spoiler

Actor "Rocketball" : Rocketlauncher 9000 <---- Weapon Dropped
{
Inventory.PickupMessage "Picked up the ball!"
Weapon.AmmoGive 1
Weapon.AmmoType "RocketAmmo"
Weapon.Slotnumber 5
States
{
 Fire:
    MISG B 8 A_GunFlash
    MISG B 12 A_FireProjectile("Rocketflying",0,1,8,8,0)
    MISG B 0 A_ReFire
    Goto Ready
 Spawn:
    ROCK A -1
    Stop
}
}

Actor "Rocketflying" : Rocket 9001 <---- Rocket I was talking about
{
Dropitem "RocketBall", 255, 1 
}

 

Share this post


Link to post

5 answers to this question

Recommended Posts

  • 0

What you need is something more like this:

Actor "Rocketflying" : Rocket 9001
{
  States
  {
  Death:
    MISL B 8 Bright A_Explode
    MISL C 6 Bright
    MISL D 4 Bright A_DropItem ("RocketBall", 1, 255)
    Stop
  }
}

I copied-and-pasted the actual rocket's death state and corrected and added your DropItem line to it.

Share this post


Link to post
  • 0

You need to spawn the item you want to drop in the projectile's death state I believe.

Share this post


Link to post
  • 0
18 hours ago, R4L said:

You need to spawn the item you want to drop in the projectile's death state I believe.

You might be right. I didn't test the code. Maybe A_DropItem doesn't work for projectiles. @Garbage, If it doesn't work, try A_SpawnItemEX, instead.

Share this post


Link to post
  • 0
16 hours ago, Empyre said:

You might be right. I didn't test the code. Maybe A_DropItem doesn't work for projectiles. @Garbage, If it doesn't work, try A_SpawnItemEX, instead.

 

A_SpawnItemEx will offer more options, but DropItem works fine.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×