Jump to content
  • 0

Actor won't spawn a projectile?


adasiok

Question

Hello! 

It's a trifle but I would like to make... a potato bag. When someone shoots it, I want a small potato to fall out of the bag and bounce a bit. A thrustable one (if possible), kicking it around will be fun for sure. The problem is... I don't know how do i make it? I tried A_CustomMissile and A_SpawnItemEX but it wont spawn anything.

 

Here's my code:

 

Potato Bag:

Spoiler

ACTOR PotatoBag 22935
{
    //$Category Decorations
    Scale 0.85
    Tag "Bag of Potatos"
    health 100000000000
    Radius 10
    Height 12
    DeathHeight 2
    +SOLID
    +SHOOTABLE
    +NOBLOOD
    States
    {
        Spawn:
            PTBG A -1
            Stop
        Pain:
            PTBG A 1 A_CustomMissile("Potato", 50, 0, 0)
            Goto Spawn
    }
}

Potato:

Spoiler

ACTOR Potato
{
    Height 4
    Radius 6
    Speed 4
    BounceFactor 0.4
    Mass 1
    ReactionTime 70
    PROJECTILE
    +DOOMBOUNCE
    - NOGRAVITY
    Seesound "PTTOB"
    States
    {
    Spawn:
       PTTO A 0 A_Playsound("NULL")
       TNT1 A 0
       PTTO ABCD 2 A_Countdown
       Goto Spawn+1
    Death:
       PTTO A 0 A_Jump(64,4)
       PTTO A 0 A_Jump(85,4)
       PTTO A 0 A_Jump(128,4)
       PTTO D 350
       Stop
       PTTO A 350
       Stop
       PTTO A 350
       Stop
       PTTO D 350
       Stop
    }
}

 

Edited by adasiok

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 1

I do not see any pain chance definition at the Potato Bag. That defaults to 0 = pain never triggers (unless you have some forcepain on the attack).

Share this post


Link to post
  • 0
Just now, jaeden said:

I do not see any pain chance definition at the Potato Bag. That defaults to 0 = pain never triggers (unless you have some forcepain on the attack).

Oh, I forgot to add it!
Thanks for a quick answer.

Share this post


Link to post
  • 0

Works great, but now, how can I make a limit? I want maximally 25 potatoes to fall out, and then nothing should happen when you continue shooting. Is this possible?

Share this post


Link to post
  • 0
8 hours ago, adasiok said:

Works great, but now, how can I make a limit? I want maximally 25 potatoes to fall out, and then nothing should happen when you continue shooting. Is this possible?

You can use user variables to easily achieve that

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...