How do I add a point when you landed in a platform

Get help using Construct 2

Post » Tue Dec 02, 2014 8:13 pm

Hello, i need to get a point every time you landed in a platform, but only the first time you landed on it. I do it but when you jump in the same platform, you get more points and i need to get only one point per platform.
Image
B
38
S
10
G
2
Posts: 66
Reputation: 2,823

Post » Wed Dec 03, 2014 3:01 am

Create a instance variable (boolean) on the platform. Call it activated for instance and set it to false for all of them on the editor.

On the events, when you land or collision with the platform, change that variable to true.

And finally on the event that adds the points, add the condition that the platform's instance variable must be false.
B
75
S
29
G
17
Posts: 256
Reputation: 15,250

Post » Wed Dec 03, 2014 5:07 pm

Xavier wrote:Create a instance variable (boolean) on the platform. Call it activated for instance and set it to false for all of them on the editor.

On the events, when you land or collision with the platform, change that variable to true.

And finally on the event that adds the points, add the condition that the platform's instance variable must be false.

i don´t know if i do it bad, or if don´t work but i still having the same problem :P
Image
B
38
S
10
G
2
Posts: 66
Reputation: 2,823

Post » Wed Dec 03, 2014 5:13 pm

Can you share your .capx?
B
75
S
29
G
17
Posts: 256
Reputation: 15,250

Post » Wed Dec 03, 2014 5:32 pm

I have solved another way, when you jump from the platform , it is removed , thus can not jump more times in it, and you can not get more points in it. To do this I created a variable number , which by default is 0 and when you jump from the platform rises to 1 , also if the variable is 1 is destroyed. Thanks for the help
Image
B
38
S
10
G
2
Posts: 66
Reputation: 2,823


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 23 guests