Skipping step when changing rooms

sercan

Member
Hi,
I have more than 10 rooms in my game. main character is set as persistant. it jumps when touching the screen. but somehow, sometimes it skips jumping. i don't know why. It looks like it more happens when changing rooms. any idea please?
 
C

Comedy Rotten

Guest
Hello sercan,

So, if I'm understanding you correctly, you have a character who jumps when you touch the screen. But, when you tap, sometimes the character does not jump. It happens mostly when you are moving from one room to another.

Are you attempting to jump during the room transition? Or are you jumping right before the room transition. Although your character is persistent, I'm not sure if all of the properties of your character are persistent (movement, etc.).
 

sercan

Member
Hello sercan,

So, if I'm understanding you correctly, you have a character who jumps when you touch the screen. But, when you tap, sometimes the character does not jump. It happens mostly when you are moving from one room to another.

Are you attempting to jump during the room transition? Or are you jumping right before the room transition. Although your character is persistent, I'm not sure if all of the properties of your character are persistent (movement, etc.).
Thanks for response,
Yes, that is exactly what happens.
I am not sure in which period i attempt. I use vspeed and gravity variables. Strangely it does not jump but keeps falling. I mean it saves the gravity value coming from the previous room.
Maybe i should create an object that saves the gravity and vspeed values and put it in each room.
 
C

Comedy Rotten

Guest
Usually, each room is treated as a separate level where the character is essentially "reset". Persistence is probably not the best way to go if I'm picturing this correctly in my head. I may simply not be picturing exactly what is happening correctly; if that's so, is there someway you could maybe post a gif of what's happening so I can see what's up?
 

rIKmAN

Member
To test whether what @Comedy Rotten is saying, create some globals, and in the Room End event copy the values into the globals.
On the Room start event in the new room, copy the globals back - or just use the globals all the time.
 

sercan

Member
To test whether what @Comedy Rotten is saying, create some globals, and in the Room End event copy the values into the globals.
On the Room start event in the new room, copy the globals back - or just use the globals all the time.
I ve just figured out the problem is not only with character. I made a counter counts the mouse click ( or tap screen) also. and i put it somewhere on screen. I determined that when charater does not jump, the counter does not count also. So it is a skipped screen tap problem. what may cause this??
I also tried it without changing rooms. No any problems occured. The keys are " room changement" and " skipped touch response"..
 

sercan

Member
Thank you guys i think i have figured out what the problem is.
It is about creation and event orders. Didn't know the orders are important. If you face with similar issue, research something about creation and event orders you will find the answers.
 
Top