Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ScriptName NameHere Extends ReferenceAlias
- Actor MyActor01
- Float Interval
- Class MyClass01
- Event OnInit()
- StartTimer(1.0) ;- run it right away the first time. Intervals can be hotswapped without screwing anything up if you define them in the TimerEvent itself.
- EndEvent
- Event OnTimer()
- Interval = 5.0 ;-defined here so it updates, if you decide to change it you can do so without a new save :)
- ;-Get your actor and define it BEFORE anything after this line.
- MyClass01 = MyActor01.GetActorBase().GetClass() ;-Get Your Class from the actor, after you have the actor and define it
- If ( MyClass01 == WhateverClass ) ;-Compare you class to game classes
- ;-MyActor01.DoSomeFancyStuffBasedOnClass
- Elseif ( MyClass01 == WhateverOtherClass )
- ;-MyActor01.DoSomeFancyOtherStuffBasedOnClass
- Else
- Debug.Messagebox("NO CLASS FOUND!") ;-If it finds nothing it will inform you.
- Endif
- StartTimer(Interval) ;- Restart the timer to loop this event.
- EndEvent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement