Blockland Forums
Home
Help
Login
Register
Blockland Forums
»
Blockland Forums
»
Modification Help
»
OnLoad?
« previous
next »
Print
Pages: [
1
]
Author
Topic: OnLoad? (Read 5737 times)
Jookia
February 26, 2007, 12:12:00 AM
How do I execute a script on the load of a gui?
Ad Bot
Advertisement
Badspot
Administrator
February 26, 2007, 01:31:54 AM
Code:
[Select]
function BlahGui::OnWake()
{
//code goes here
}
Jookia
February 26, 2007, 01:34:26 AM
What IF there is another function of the same thing, etc i want to exec a file onwake of a dso'ed gui.
Badspot
Administrator
February 26, 2007, 01:37:25 AM
What are you trying to do exactly? You could just exec the file before hand.
Jookia
February 26, 2007, 01:41:36 AM
When I load the main menu gui, I want to make a box come up saying 'Welcome, %name!'.
Trader
February 26, 2007, 02:35:26 AM
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.
Oxcorp
February 26, 2007, 02:36:39 AM
You'd have to find when the gui is being exe'd then put the function right beside it.
Jookia
February 26, 2007, 02:37:42 AM
O.o
Trader
February 26, 2007, 03:34:15 AM
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.
Oxcorp
February 26, 2007, 02:41:27 PM
Oh, lol. Forget what I said xD
Print
Pages: [
1
]
« previous
next »
Blockland Forums
»
Blockland Forums
»
Modification Help
»
OnLoad?