Game Development Community

GUiObjectView

by Fucifer · in Torque Game Engine · 06/13/2006 (6:58 pm) · 6 replies

Give it the name MainMenuObjectView, and exec this code in the main menu's onWake event:
John how do you exec the onWake event. I have it couple different ways and so far no luck.

#1
06/14/2006 (1:20 am)
Function mainMenu::onWake()
{
//exec code here
}
#2
06/14/2006 (7:13 am)
Thanks, Tom I have try this in the mainMenuGui but it will not compile to a dso. I am placing it in the wrong place.
#3
06/14/2006 (8:06 am)
That form is named 'MainMenuGui', try using this:

function MainMenuGui::onWake(%this)
{
}
#4
06/14/2006 (8:11 am)
Thanks, But in my TLK 1.4 I have this one mainMenuGui, do you think that is the problem. Ok it is working now but there is no texture on model. Does the texture auto load or do I need to script it in?
#5
08/11/2006 (5:53 pm)
Quote:Thanks, But in my TLK 1.4 I have this one mainMenuGui, do you think that is the problem. Ok it is working now but there is no texture on model. Does the texture auto load or do I need to script it in?

In case you didn't figure this out already, I added the mesh/texture file to the client/ui/mainMenuGui.gui

function MainMenuGui::onWake(%this)
{
   MainMenuObjectView.setObject("player", "starter.fps/data/shapes/player/player.dts", "starter.fps/data/shapes/player/player.png", 0);
}

This will force it to load the mesh/texture (or at least this worked for me)
#6
08/11/2006 (7:25 pm)
Thanks alot. Work perfectly.