I am making a script, that when press a button, the entity will disappear and reappear, the entity pointer is working now, but .visible parameter doesnot work. I also have tested .visible without any function, but it bring nothing
my script here
Code:
Entity* obj_labo;
var labo_appear = 0;
Action act_labo
{
obj_labo = my;
}
function fcnt_labo()
{
if (labo_appear == 0)
{
//obj_labo.material = crome;
obj_labo.visible = off;
obj_labo.passable = off;
labo_appear = 1;
}
else
{
obj_labo.visible = off;
obj_labo.passable = on;
labo_appear = 0;
}
}
The entity has the action: act_labo
==
Anyone knows please help