Quantcast
WoWInterface - View Single Post - How to trigger functions in game
View Single Post
08-02-20, 06:39 AM   #1
Lyeeroy
A Defias Bandit
Join Date: Aug 2020
Posts: 2
Question How to trigger functions in game

Hi, have simple question..

Have a code with functions like this:

Lua Code:
  1. local version = 0.8
  2.  
  3. print("func " .. version .. " loaded")
  4.  
  5. function func_OnEvent(self, event)
  6.     --some code
  7. end
  8.  
  9. function MsgTop(string)
  10.     --some code
  11. end
  12.  
  13. function MsgChat(string)
  14.     --some code
  15. end

How do I call _OnEvent in game? I cant get it. Is this via XML? Or should I just call it on top of the code by:
Lua Code:
  1. func_OnEvent()
It seems weird.

Last edited by Lyeeroy : 08-02-20 at 06:41 AM.
  Reply With Quote