Hey,
Rooms have a property called ShowPlayerCharacter in the editor, that can be either true or false. How do I get that specific property value for the current room the player is, in the scripts?
I don't think you can, this is one of the missing abilities. I may suggest to duplicate this flag as room's custom property and check that.
Or not use it at all, turn the player invisible in room_Load instead and check that.
Guess I am going to use Room_Load to set transparency to 100 and Room_Leave to set it back to 0. :O
Thinking about this some more, it's probably better to move the player out of the screen instead, using player.y = -1; or something like that.
Mostly because a completely transparent but clickable character might still catch clicks.
As for using room_Load / room_Leave, you can also do this instead:
int playerY;
function on_event(EventType event, int data) {
if (event == eEventEnterRoomBeforeFadein) {
if (room == 2 || room == 7) {
playerY = player.y;
player.y = -1;
}
else if (player.y == -1) player.y = playerY;
}
}
This will remove the player for room 2 and 7, and restore them to their previous coords for other rooms, but only if they were hidden upon entering the previous room.