Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ScriptName RDE_DetonationScript extends ObjectReference
- {Detonation Script fro RDE. Attached to detonater}
- float Property WorkingRadius = 10000.0 Auto
- { what's the trigger range of the detonator }
- ; float Property SignalSpeed Auto Const
- ; { in units/second, used to determine the staggering effect }
- Projectile Property RDE_Projectile Auto
- Function Detonate(ObjectReference RDE)
- ; Test to see which if any of these works to make the mine explode, and give credit for potential kills
- RDE.DamageObject(100.0)
- ; RDE.DamageValue(Game.GetHealthAV(), 100.0)
- ; Below probably won't work
- ; RDE.Activate()
- ; RDE.Fire(akSender)
- ; RDE.Fire(Self as ObjectReference)
- ; RDE.Fire(Game.GetPlayer())
- EndFunction
- Event OnEquipped(Actor akActor)
- If (akActor == Game.GetPlayer())
- RegisterForAnimationEvent(akActor, "WeaponFire")
- EndIf
- EndEvent
- Event OnUnequipped(Actor akActor)
- If (akActor == Game.GetPlayer())
- UnregisterForAnimationEvent(akActor, "WeaponFire")
- EndIf
- EndEvent
- Event OnAnimationEvent(ObjectReference akSource, string asEventName)
- ObjectReference[] RDEsToExplode = akSource.FindAllReferencesOfType(RDE_Projectile as Form, WorkingRadius)
- int i = 0
- Debug.Notification("Found " + RDEsToExplode.Length + " RDEs.")
- While (i < RDEsToExplode.Length)
- Detonate(RDEsToExplode[i])
- i += 1
- EndWhile
- EndEvent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement