BasicExplosion
is an actor that can be inherited from to get an actor that will receive projectile team colors, but will not collide on terrain or other actors, making it ideal for handling explosion effects with graphics.
<aside> 🚨 Wait! Stop! Before you copy this actor's definition into your mod, remember the following things:
actor BasicExplosion : ProjSpawnFuncActor
{
Obituary "%o told %k they forgot the obituary. (BasicExplosion)"
DamageType "Normal"
+MISSILE
+NOTELEPORT
-SOLID
+NOCLIP
+DONTBLAST
+NOGRAVITY
+RIPPER
+SKYEXPLODE
+NOINTERACTION
+DONTSPLASH
+THRUGHOST
+THRUACTORS
+DONTREFLECT
Damage (0)
radius 2
height 2
scale 2.5
Speed 0
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Explode(5000,32,0)
stop
Death:
TNT1 A 1
stop
}
}
These are user variables that can be added to the actor for various effects. You do not need to give them a value, they just must be defined.
var int user_NoTranslation
- Disables projectile team colors on this actor
var int user_TranslateWhiteColors
- Allows projectile team colors to recolor white.
var int user_TranslateBlackColors
- Allows projectile team colors to recolor black.
var int user_PierceRipper
- Makes it so that this actor only does damage once to another actor. The actor being damaged must have +USEDAMAGEEVENTSCRIPT
, like players already do.
A_GiveInventory("PierceRipperLimit", x)
in the Spawn
state of the actor.var int user_DamageKill
- Makes it so that this actor only does damage once before entering Death
state. The actor that is being damaged must have +USEDAMAGEEVENTSCRIPT
, like players already do. The actor with this flag must also have reactiontime
set.
reactiontime
value. A projectile with reactiontime 3
will only be able to damage 3 times to any players before dying.This is the actor spawned by Top Spin in MM8BDM for its damage dealing.
actor TopRadius : BasicExplosion
{
damagetype "TopSpin"
Obituary "$OB_TOPSPIN"
States
{
Spawn:
TNT1 A 0
TOPS A 2 A_Explode(15,90,0)
stop
}
}