Advertisement
Guest User

Untitled

a guest
May 28th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. ScriptName NameHere Extends ReferenceAlias
  2.  
  3. Actor MyActor01
  4. Float Interval
  5. Class MyClass01
  6.  
  7. Event OnInit()
  8. 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.
  9. EndEvent
  10.  
  11. Event OnTimer()
  12. Interval = 5.0 ;-defined here so it updates, if you decide to change it you can do so without a new save :)
  13. ;-Get your actor and define it BEFORE anything after this line.
  14. MyClass01 = MyActor01.GetActorBase().GetClass() ;-Get Your Class from the actor, after you have the actor and define it
  15.  
  16. If ( MyClass01 == WhateverClass ) ;-Compare you class to game classes
  17. ;-MyActor01.DoSomeFancyStuffBasedOnClass
  18. Elseif ( MyClass01 == WhateverOtherClass )
  19. ;-MyActor01.DoSomeFancyOtherStuffBasedOnClass
  20. Else
  21. Debug.Messagebox("NO CLASS FOUND!") ;-If it finds nothing it will inform you.
  22. Endif
  23.  
  24. StartTimer(Interval) ;- Restart the timer to loop this event.
  25. EndEvent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement