Author Topic: OnLoad?  (Read 4033 times)

How do I execute a script on the load of a gui?


  • Administrator
Code: [Select]
function BlahGui::OnWake()
   //code goes here

What IF there is another function of the same thing, etc i want to exec a file onwake of a dso'ed gui.


  • Administrator
What are you trying to do exactly?  You could just exec the file before hand. 

When I load the main menu gui, I want to make a box come up saying 'Welcome, %name!'.

Well, you're probably out of luck unless you get your hands on the current onWake code for that GUI.  If you were to code a new onWake for that GUI, it would override it and, well, not work out well for you.

You'd have to find when the gui is being exe'd then put the function right beside it.

Oxcorp, you're a bit off track here.  It's not about when the GUI is being exec'd, it's about when the GUI become active (ie - when the user starts using it).  That's what onWake means.  That's why Jookia isn't going to have much luck, because I'm sure the MainMenuGui.onWake has already been defined.

Oh, lol. Forget what I said xD