problems with layout transitions

For questions about using Classic.

Post » Tue Mar 05, 2013 4:26 am

hi i'm having a problem with transitioning from one layout to another.

so i have a transition sprite (invisible over a door sprite) that if the player is overlapping and you press the up arrow key you transition to a selected layout. in the next layout i have the character spawn in the same place where the door is to get out and go back to the first layout, which i have a different transition sprite overlapping the door.

what happens is when i press up at the first transition sprite it also plays the event for the second transition sprite, so you end up back in the same layout.

i can tell it already used the second transition because i have music playing at the start of the first layout and it starts all over again after pressing up.

i tried using an ELSE event, but that didnt work.


any help would be awesome thanks!

EDIT:

i also have trigger once condition on these

EDIT:

FIXED i think?

- what i did was for the transition object i have it positioned on the start of layout and now it doesnt skip over.. i hope

EDIT:

nevermind, didn't work ):

EDIT:

okay so i switched the order of the events.. instead of having "on key pressed" first, on put whether the character was overlapping the transition object first. it seems to be working now

EDIT:

ahhhhhhhhhHHHHHHHHHHH!!!! nevermind i cant get this to work hasmu12152013-03-05 18:39:18
B
4
Posts: 14
Reputation: 328

Post » Tue Mar 05, 2013 6:50 pm

WELP i gave up. now im just going to use different keys for the transitions
B
4
Posts: 14
Reputation: 328

Post » Mon Mar 11, 2013 11:04 pm

Post the cap, it is hard to understand your problem, and a lot harder to explain how you could do it without seeing the whole thing.:)

Every time you need some help, and it is not like "is it possible to do <something>?" post the cap, you will more likely to get an answer if you do.
B
10
S
6
G
3
Posts: 127
Reputation: 2,481

Post » Tue Mar 12, 2013 10:16 pm

okay thanks pecek. will note for the future, although in regards to this problem i found an alternative way, maybe next project i'll fix up a test cap so i can upload it. im kinda iffy about uploading the cap im working on now cus ive put alot of work into it

thanks again
B
4
Posts: 14
Reputation: 328

Post » Tue Mar 12, 2013 10:28 pm

Use a global variable, like layoutState, when they hit up, have a condition that the event only fire if layoutState = 0.

In the event before calling the next layout, set layoutState = 1. That way when the new layout loads, they cannot trigger the door again right away because layoutState equals 1. Then figure out what needs to happen to set it back to zero. Either a timer, or another event so they can then use the door again.
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,418

Post » Tue Mar 12, 2013 11:19 pm

awesome thanks bluephaze
B
4
Posts: 14
Reputation: 328


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest