Hey,
I have an animated object that pops up that I want to be invisible the next time the player clicks the mouse anywhere. Is there a command that I can put in the room script?
If not, could someone help me out by suggesting another way? Maybe with bool and on_mouse_click? But I don´t have a precise idea how it could work.
I'm not 100% sure what you mean here. They player walks into the room...then what happens? The player enters the room and the animated object is animating which you want to stop animating as soon as the player clicks anything or anywhere in the room?
You can indeed use on_mouse_click():
function on_mouse_click(MouseButton button) {
if (oPopup.Visible && button == eMouseLeft) {
oPopup.Visible = false;
ClaimEvent(); // don't do anything further
}
}
(just add this to your room script, doesn't have to be linked to an event)
Thanks Khris, that works just like I hoped!