How do I move to new layout with button and coins

Get help using Construct 2

Post » Thu Apr 09, 2015 3:13 pm

Since I am new at this, this question is probably out of my league. I'm thinking it will require some programming skills (which I don't have). But here it goes anyway,
When my player collides with a door, and if he has 5 coins. He will be asked if he really wants to continue, then, when the player clicks on a "Continue" button, he can
go to the next level and 5 coins will be removed from his collection of coins.
I have looked at tutorials and on this forum but can't find anything like this.
Thanks
B
4
Posts: 15
Reputation: 230

Post » Thu Apr 09, 2015 3:31 pm

If coins is a global variable

on clicked continue
- system subtract 5 from coins
- system goto layout

Oh.. you probably only want to show continue if coins is more than 5

player on collision with door
system compare variable coins bigger or equal to 5
- door spawn object continue (or any other way you'd like to have continue appear)

By right clicking the event you can add another condition, for if you didn't know.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Apr 09, 2015 7:54 pm

Works Great! Thanks !!
B
4
Posts: 15
Reputation: 230

Post » Thu Apr 09, 2015 8:57 pm

I wouldn't have learned without this forum, just returning the favour..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: Darknessed and 47 guests