How do I check the right colour (true/false

Get help using Construct 2

Post » Fri Jan 08, 2016 12:43 pm

Hi, its me again :roll:

This is my idea i want to create:

Image

1. The black ball can be moved and the square in the left upper corner is telling the player which colour he should reach to get a point. If you touch the yellow or green box the game is over.

2. If the blue box is right, the square in the left upper corner should randomly change its colour to green, blue or yellow. In this example its green and the player again should reach the green box.

I hope you guys know what i mean ^^
The problem is i have no idea how to do it... How can i check if it is the right colour and then change it to the next one?

Thank you very much :D
B
7
S
2
Posts: 25
Reputation: 507

Post » Fri Jan 08, 2016 12:59 pm

You don't need to check the colour..
I'm guessing if you are using a sprite, the colours would be animationframes and you can just check for those..
If you want to use 9-patch or tiledbackground, just put them in a family.
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 » Fri Jan 08, 2016 3:43 pm

Great, i'll give it a try :)

Thanks
B
7
S
2
Posts: 25
Reputation: 507

Post » Sat Jan 09, 2016 9:58 am

Hello,

shame on be but I don't really get it ^^
I have a problem with checking the right colour connected to the defiend colour pattern in the left corner and then change it and check it again.

Does anyone have a link or a code example idea, that would be awesome :) (couldn't find i link that fits for my project...)

Thank you veeerrry much
B
7
S
2
Posts: 25
Reputation: 507

Post » Sat Jan 09, 2016 10:06 am

I'm not sure what the problem is..

Let's say you are using animationframes..

If the animationframe of the sprite in the left corner is the same as the animationframe of the sprite the ball collides with everything is good, else the ball dies..

After that you set the animationframe of the sprite in the corner to choose(0,1,2)
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 » Sat Jan 09, 2016 11:19 am

Ah ok i think i get it :D sorry my mistake...

Thanks LittleStain ;)
B
7
S
2
Posts: 25
Reputation: 507


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, ksiads, R0J0hound, RozekEnhance and 7 guests