I made it so once the sticky missile hits a floor or a ceiling, it stops its movement alltogheter and is only nullified if detonated or if the user die. The projectile is made shootable/killable so enemy players/enemies have a chance to destroy it.
My current problem is, i've been goofing around a bit with both projectiles and when a grenade hitsa sticky mine that is on the floor, it not only kills it, but it bounces off as if it hit a wall or a prop actor and keeps rolling until it explodes rather than explode on direct hit like enemies. My goal is to make it so if the grenade was to impact the sticky, both would explode. But i can't get my hand on where the issue is between both projectiles.
EDIT: I feel like i will have to be more specific because so far we have no been going anywhere with this. My goal is NOT to have the grenade go through the sticky and no touch it, i actually WANT this to happen. What i want too, is for them to both enter their death state when they imapct with eachother. The problem is, only the sticky bomb does, and the grenade bounces off as if it was a mere wall rather than die like it was hitting a monster.
Here's the codes
the grenade:
Code: Select all
ACTOR Grenader
{
Radius 6
Height 6
Speed 25.35
Damage (50)
Gravity 0.50
Projectile
+Randomize
+ROCKETTRAIL
+DONTHARMSPECIES
+MTHRUSPECIES
-NoGravity
+DoomBounce
+USEBOUNCESTATE
-BOUNCEAUTOOFF
+BOUNCEAUTOOFFFLOORONLY
Alpha 0.75
BounceFactor 0.50
Obituary "%o was destroyed by %k's Grenade."
SeeSound "GLBounce"
States
{
Spawn:
GRL2 A 1 Bright
Loop
Bounce:
GRL2 DCBA 2 Bright
goto Spawn
Death:
GRL2 A 0 Bright A_ChangeFlag("NoGravity", 1)
GRL2 A 0 Bright A_ChangeFlag("FORCEXYBILLBOARD", 1)
GRL2 A 0 Bright A_Explode(25, 128)
GRL2 A 0 Bright A_Explode(25, 128, 0)
GRL2 A 0 A_Playsound("BaBoom")
MISL B 8 Bright
MISL C 6 Bright
MISL D 4 Bright
Stop
}
}
Code: Select all
ACTOR Sticky
{
Radius 6
Height 6
Speed 25
Damage 0
Gravity 0.65
Health 20
Projectile
-NOBLOCKMAP
+Randomize
-NoGravity
+DoomBounce
+NOTARGETSWITCH
+THRUGHOST
+ALLOWBOUNCEONACTORS
+BOUNCEONACTORS
-BOUNCEAUTOOFF
//+BOUNCEAUTOOFFFLOORONLY
+SHOOTABLE
//+DONTGIB
// +NOICEDEATH
// -NOBLOOD
Alpha 0.75
BounceFactor 0.05
WallBounceFactor 0.05
Obituary "%o came across %k's Sticky Bomb."
States
{
Spawn:
GL21 A 0 nodelay ACS_ExecuteAlways(700)
goto spawn2
spawn2:
SIK1 A 0 A_CheckFloor ("FloorSucker")
SIK1 A 0 A_CheckCeiling ("CeilingSucker")
SIK1 A 1
////
SIK1 A 0 A_CheckFloor ("FloorSucker")
SIK1 A 0 A_CheckCeiling ("CeilingSucker")
SIK1 B 1
////
SIK1 A 0 A_CheckFloor ("FloorSucker")
SIK1 A 0 A_CheckCeiling ("CeilingSucker")
SIK1 C 1
Loop
FloorSucker:
SIK1 A 0 A_Stop
SIK1 A 0 A_ChangeFlag("NoGravity", TRUE)
SIK1 A 0 A_ChangeFlag("FLOORHUGGER", TRUE)
SIK1 A 1
Loop
CeilingSucker:
SIK1 A 0 A_Stop
SIK1 A 0 A_ChangeFlag("NoGravity", TRUE)
SIK1 A 0 A_ChangeFlag("CEILINGHUGGER", TRUE)
SIK1 A 1
Loop
Death:
SIK1 A 0 A_ChangeFlag("NoGravity", TRUE)
SIK1 A 0 A_Stop
GRL2 A 0 Bright A_Explode(50, 128)
GRL2 A 0 Bright A_Explode(50, 128, 0)
GRL2 A 0 A_Playsound("weapons/rocklx")
MISL B 8 Bright
MISL C 6 Bright
MISL D 4 Bright
Stop
Canceled:
PUFF ABCD 3 Bright
Stop
}
}