Alright, so I'm using:
PHP Code:
new GuiShowImgCtrl("Arm_Inventory_IconBox_" @ temp.v) {
x = new_x_position;
y = new_y_position + 10;
image = "armageddon_inventory-iconbox.gif";
mode = 1;
new GuiShowImgCtrl("Arm_Inventory_Icon_" @ temp.v) {
image = search_list[temp.v].image;
x = 0; // Since it's a child of 'IconBox' it's x/y will be relative.
y = 22; // It should also draw above the icon box as well.
mode = 1;
}
}
but anything like this will not make it go away later in a different function.
And yes, I know I don't need 99999.
PHP Code:
for (v=0;v<99999;v++) {
Arm_Inventory_IconBox_(@temp.v).hide();
Arm_Inventory_Icon_(@temp.v).hide();
}
PHP Code:
for (v=0;v<99999;v++) {
"Arm_Inventory_IconBox_"(@temp.v).hide();
"Arm_Inventory_Icon_"(@temp.v).hide();
}
PHP Code:
for (v=0;v<99999;v++) {
("Arm_Inventory_IconBox_"@temp.v).hide();
("Arm_Inventory_Icon_"@temp.v).hide();
}
destroy() is what I really want, but it doesn't work either in a diff funciton.
Also tried doing it OP way with addcontrol, and setting them as this commands to call destroy later, but also didnt work.
PHP Code:
for (v=0;v<player.weapons.size();v++) {
this.("weapon"@temp.v).clearControls();
this.("shadow"@temp.v).clearControls();
}
I tried destroy and hide as well. Was just hoping with clearControls.
P.S.
The way I was doing it in my OP, I did have to add addcontrol for it to work like that. After adding that, it showed up fine. I just changed it to this way thinking it would be easier to make it disappear in a different function. :/