1.) With +MISSILE, it bounces around, does damage on impact, but vanishes just a moment after hitting the ground.
2.) Without +MISSILE, it stays around after it hits the ground, but it no longer bounces, doesn't do any sort of damage at all, and also doesn't disappear when it hits water.
I'm interested in learning how to do this as I'm also thinking about making actual land mines in this little thing I'm cobbing together over here, but right now it's one step at a time. For reference, here is the code for both the projectile itself and, if it's at all relevant, the monster that is throwing it.
Code: Select all
ACTOR GlassShard1
{
+NOBLOCKMAP
+DROPOFF
// +MISSILE
+ACTIVATEIMPACT
+ACTIVATEPCROSS
+NOTELEPORT
+FORCEPAIN
+NOEXTREMEDEATH
RenderStyle "Translucent"
Alpha "0.2"
Damage 2
BounceType "Doom"
SeeSound "misc/chat2"
BounceSound "misc/chat2"
States
{
Spawn:
ICEC A 1
Wait
Death:
ICEC A 1 A_Explode (1, 0, false, false)
Stop
}
}
ACTOR GlassImp : DoomImp
{
+MISSILEMORE
+NOBLOOD
+AVOIDMELEE
Translation "61:79=[255,255,255]:[84,152,180]","171:191=193:207"
RenderStyle "Translucent"
Alpha "0.2"
Speed 10
Health 25
PainChance 255
Obituary "%o was shattered by a glass imp."
States
{
Melee:
TROO EF 8 A_FaceTarget
TROO G 6 A_CustomMeleeAttack(random (1,4)*3,"imp/melee")
TROO G 0
Missile:
TROO EF 4 A_FaceTarget
TROO G 4 A_ThrowGrenade (GlassShard1, 0, random(3,15), random(1,10))
Goto See
Death:
TROO I 8 A_Scream
TROO I -1 A_IceGuyDie
stop
}
}