-
Notifications
You must be signed in to change notification settings - Fork 0
KAI_UniversalFunctions
This is a mixin class that contains functions and variables that can be used by any actor, including ones not based on KAI_Actor. Currently it just contains code for preventing allies from being harmed by explosions.
- TempAllyList: An array that stores actor pointers to every actor caught by MakeAlliesImmuneToExplosion(). Keeps track of actors that were temporarily given +NORADIUSDMG to remove the flag from them (If it wasn't on already) after the explosion occurs.
- Source: The actor that is considered the source of the explosion. Which actors caught in the blast are allies is checked relative to this actor.
- Radius: The radius in which to prevent friends of the Source from being harmed. This is generally as large as the blast radius itself.
- None
Gives the +NORADIUSDMG flag to any friends of the Source actor that are within the specified radius, unless they have the flag already. If the Source is a non-KAI actor, then hostility is checked with IsHostile(), if Source is a KAI NPC however, it's tested with the IsActorHostile() virtual.
- None
- None
- Removes +NORADIUSDMG from any actors in the TempAllyList array, and clears the array.
This is an explosion that does not produce friendly fire by calling MakeAlliesImmuneToExplosion() right before A_Explode, then after the explosion runs, calls RemoveAllyExplosionImmunity() to make the allies vulnerable to blast damage again, if they were vulnerable before.
MakeAlliesImmuneToExplosion (Target, 128);
A_Explode (96,128,XF_EXPLICITDAMAGETYPE,True,32,damagetype:'Explosive');
RemoveAllyExplosionImmunity();
- Home
- Features
- Classes
- Functions
- Guides