Ok cool that was it. Can you give me a brief explanation of making variables objects and why?
Also, am I doing the addcontrol correctly? It tends to mess things up but I obviously wanted it all to be part of a control. Specifically in this weapon another brings up bitmap buttons and it seems they lose on catchevent if I hit any button or click anything, even one of the 3 buttons itself. Even the hover highlight never works at all unless I remove the addcontrol.
PHP Code:
// Function to move in message on the screen
function showOptions(temp.idC)
{
echo(this.options[temp.idC]);
("Dialog_Choice" @temp.idC).destroy();
new GuiBitmapButtonCtrl("Dialog_Choice" @temp.idC)
{
y = 150;
destroyonhide = true;
text = thiso.options[temp.idC];
//normalbitmap = "";
//mouseoverbitmap = "";
//layer = 7;
zoom = 0.6;
alpha = 1;
this.join("tween");
this.catchId = temp.idC;
thiso.catchevent(this, "onMouseUp", "selectedOpt");
}
Dialog_Control.addcontrol(@ "Dialog_Choice" @temp.idC);
// tween the image x
(@"Dialog_Choice" @temp.idC).tween("x", 0.5, 0, 50);
waitfor((@"Dialog_Choice" @temp.idC), "TweenFinished", 0.05);
// tween the image y
(@"Dialog_Choice" @temp.idC).tween("y", 0.5, (@"Dialog_Choice" @temp.idC).y, (@"Dialog_Choice" @temp.idC).y + (temp.idC * 300));
waitfor((@"Dialog_Choice" @temp.idC), "TweenFinished", 0.05);
}