How do I

Get help using Construct 2

Post » Tue Mar 11, 2014 12:45 pm

Hi,

How can i achieve the following:

I have a sprite ( a block ) in the colour of say blue and i have another identical sprite on top of it with a colour of say red with it's visibility set to invisible.

I create a floor or platform of these blue blocks and when the player walks over them they turn red by setting the red blocks visibility to visible.

When i try this, all the blocks turn red instead of just the one the player touched.

I'm a little confused as to how i set each block to change colour one at a time.
B
7
S
2
Posts: 110
Reputation: 927

Post » Tue Mar 11, 2014 1:06 pm

Can you attach your capx ? Not enough informations on your events logic. :)

Logically the event should be :

On collision with red sprite
-> red sprite set visible
B
39
S
15
G
5
Posts: 295
Reputation: 6,089

Post » Tue Mar 11, 2014 1:31 pm

Sure, here it is. As you can see all the blocks change color rather than individualy upon being touched by the player.

https://dl.dropboxusercontent.com/u/873 ... 0Test.capx
B
7
S
2
Posts: 110
Reputation: 927

Post » Tue Mar 11, 2014 1:57 pm

This fix will work, but you can achieve what want differently.

For example you could add a frame to your blue block, a red frame at position 1, set the animation speed of the object to 0, then when the player touch a blue square :

On collision with blue block -> set frame to 1.
You do not have the required permissions to view the files attached to this post.
B
39
S
15
G
5
Posts: 295
Reputation: 6,089

Post » Tue Mar 11, 2014 2:02 pm

Cool..:D Thank's muchly
B
7
S
2
Posts: 110
Reputation: 927


Return to How do I....?

Who is online

Users browsing this forum: lukewasthefish, marc254, Mayfly, tarek2, UberLou and 19 guests