Jump to content

Welcome to Gaming On Steroids Forums
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account
Photo

[15 December 2015] Added OnUnLoad, OnBugSplat, OnAnimation.


  • This topic is locked This topic is locked
No replies to this topic

#1
Feretorix

Feretorix

    Administrator

  • Administrators
  • 3,144 posts

I will just post an example, the functions are self-explanatory.

 

 

 

 
OnUnLoad(function() --function triggers when we press F6 and this gets called exactly before LUA engine is destroyed.
MessageBox(0,"OnUnLoad Trigger!","Hello from LUA!",0);
end)
 
OnBugSplat(function(ErrorStr) --function triggers when a bugsplat occurs, ErrorStr is a msg generated from GoS.
MessageBox(0,ErrorStr,"OnBugSplat from LUA!",0);
end)
 
OnAnimation(function(Object,animation)  --function triggers when the "Object" changes it's "animation" which is a string
if Object == GetMyHero() then --filter only animations from our champion
MessageBox(0,animation,"OnAnimation from LUA!",0);
end
end)
 

  • 2




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users