Is it possible that in - for example - on_event (enter_room, data) data could mean ANY room? And similarly with other on_events?
It would be very useful and time-saving feature!
I may elaborate on this later, if others don't see the rewards of having this feature.
I'm not sure what you mean.
on_event is called whenever the player enters any room, and the data parameter has the room number in case you need to know it. If you don't care, just ignore the data parameter.
Ooh, sorry, I mistook everything with everything!
I wanted to make the game do something everytime the character enters a new room and though that data has to be always specifed... now I know how to do it.
Delete this thread, sorry to harras you.
Hehe no worries, I'll post the solution in case anyone searches for this in future.
function on_event(int event, int data) {
if (event == ENTER_ROOM) {
Display("You've just entered a new room! Room %d!", data);
}
}