ProjSpawnFuncActor
is a simpler version of BasicProjectile
. It’s a basic actor with no new properties aside from the fact that it activates all spawn functions for projectiles. This actor is extremely bare-bones and should only be used when you specifically want a projectile that triggers spawn functions, but has different requirements from BasicProjectile
.
Similar to BasicProjectile
, this should only be used for projectiles below speed 60. If you want a projectile that’s faster, use ProjSpawnFuncActorFast
instead.
<aside> 🚨 Wait! Stop! Before you copy this actor's definition into your mod, remember the following things:
actor ProjSpawnFuncActor
{
+USESPAWNEVENTSCRIPT
var int user_UseProjSpawnFunc;
}
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.var int user_noOwnerDamage
- If the actor has the +SHOOTABLE
actor flag, the +USEDAMAGEEVENTSCRIPT
actor flag, and a health
value, this property will prevent the owner of the actor as well as their teammates from dealing damage to it.
Here is the actor that Item-1 uses in MM8BDM.
actor Item1Platform : ProjSpawnFuncActor
{
height 4
radius 24
scale 2.5
+FORCEYBILLBOARD
+NOGRAVITY
-SHOOTABLE
+SOLID
+THRUSPECIES
+THRUGHOST
+DONTBLAST
+DONTREFLECT
+MISSILE
species "MovingPlatform"
+THRUSPECIES
States
{
Spawn:
ITEM A 1
ITEM A 0 A_Stop
ITEM A 0 A_ChangeFlag(MISSILE,0)
ITEM A 0 A_ChangeFlag(THRUGHOST,0)
ITEM A 0 A_PlaySoundEx("assists/item1spawn", "Body")
ITEM ABABABABABABABAB 3
ITEM AZBZAZBZAZ 3
Goto Death
Death:
TNT1 A 0 A_SpawnItemEx("ExplosionEffect1", 0, 0, 0, 0, 0, 0, 0, SXF_WEPFXCOLOR)
stop
}
}