Has anyone been able to compile scripts using these functions?
Scriptname TransformationSafetyScript extends Actor import ActiveMagicEffect;Setting an NPC's race will fail if the NPC is currently bleeding out. This means it's possible to get stuck in a transformation if bleeding out while it ends.;This small script will revert the NPC back to their normal form after Bleeding Out ends if the transformation duration already expired.Race Property NPCRace autoMagicEffect Property TransformMagicEffect autoEvent OnEnterBleedout() if GetRace() != NPCRace registerForUpdate(0.5) endifendEventEvent OnUpdate() if HasMagicEffect(TransformMagicEffect) == false if IsBleedingOut() == false if GetRace() != NPCRace SetRace(NPCRace) endif endif;This is separated as a final safety measure if GetRace() == NPCRace UnregisterForUpdate() endif endifendEvent
GetActorBase().SetEssential()
MyActiveEffect.Dispel()