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
}
}
Question
adasiok
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:
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:
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
}
}
Share this post
Link to post
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.