GML Can't set object as invisible.

T

tijeseffff

Guest
I have a script which hides every objects by setting objectname.visible = false;
Well there is a problem. I have an object which is created only by instance_create() if global.neededmoney = 0.
And this object is called obj_portal. It has
Events | Actions
collision with obj_player | goto next room
And it can't be set as "invisible"
I even binded home key to "obj_portal.visible = false;"
I was spamming this key like crazy, doesn't work.
 

CloseRange

Member
you could always try adding this code:
Code:
obj_portal.image_alpha = 0;
then set it back to 1 when you want it to be visible again.
 

CloseRange

Member
and there is no draw event inside this object? Is there anywhere that says to draw a sprite at obj_portal's position?
also try:
Code:
with(alll) visible = false;
this will set EVERY object to be invisible. Does this turn obj_portal off?
 
T

tijeseffff

Guest
and there is no draw event inside this object? Is there anywhere that says to draw a sprite at obj_portal's position?
also try:
Code:
with(alll) visible = false;
this will set EVERY object to be invisible. Does this turn obj_portal off?
No, there is only collision event.
And now I understand why it's not disabling.
the code for creating portal is in the step event, so it is placing portal many many times, going to fix that.
 
Top