[SOLVED] function room_SecondLoad()?

Started by nightmarer, Wed 18/03/2020 19:22:00

Previous topic - Next topic

nightmarer

Good evening all.

How can I create a function which activates if it is not the first time it loads, or if it is the third or forth time?

Regards.

Cassiebsg

Depends, do you need to know how many times you visit the room, create an int variable, add +1 every time the player enters the room and then do an if condition to check where the counter is at.

If you just want something to happen the same every time except the first time, then just use the before and after fade in existing functions.
There are those who believe that life here began out there...

TheManInBoots

#2
In case it might be helpful I'd like to mention that there is also a room_FirstLoad() function that is only triggered once the very first time when the player enters the room
(if you check the room's events panel).

nightmarer

Quote from: TheManInBoots on Thu 19/03/2020 02:33:41
In case it might be helpful I'd like to mention that there is also a room_FirstLoad() function that is only triggered once the very first time when the player enters the room
(if you check the room's events panel).

Yes, I know. My question was about a function which is not this one.

nightmarer

Quote from: Cassiebsg on Wed 18/03/2020 19:31:21
Depends, do you need to know how many times you visit the room, create an int variable, add +1 every time the player enters the room and then do an if condition to check where the counter is at.

If you just want something to happen the same every time except the first time, then just use the before and after fade in existing functions.

Thank you very much. This works!!

SMF spam blocked by CleanTalk