Originally Posted by
Toxys
I don't set the model at spawn as I said this script is setting the model when I click on a button in the menu... a .menu file handling the setmodel or I'm wrong?
PHP Code:
execKey "a" { play "mouse_click"; scriptMenuResponse "xmodel/brush_desertshrubgroup01"; close objects1 }
itemDef
{
name "button_a"
visible 1
rect 0 0 128 20
origin ORIGIN_CHOICEA
forecolor GLOBAL_UNFOCUSED_COLOR
type ITEM_TYPE_BUTTON
text "@OBJ_OBJ1_1"
textfont UI_FONT_NORMAL
textscale .3
textstyle ITEM_TEXTSTYLE_SHADOWED
textaligny 20
action
{
play "mouse_click";
scriptMenuResponse "xmodel/brush_desertshrubgroup01";
close objects1
}
}
1. try search code from .gsc like:
PHP Code:
/* ... */
self waittill("menuresponse", menu, response);
if (menu == "objects1")
self setmodel(response);
/* ... */
2. try
PHP Code:
makeInvisible(arg)
{
if(!isdefined(self.isInv)) self.isInv= false;
if((arg) && (!self.isInv))
{
//save model before invi
self maps\mp\_utility::saveModel();
self detachall();
self setmodel("");
self.isInv = true;
}
else
{
if(!isdefined(self.pers["savedmodel"]))
maps\mp\gametypes\_teams::model();
else
maps\mp\_utility::loadModel(self.pers["savedmodel"]);
self.isInv= false;
}
}