Change color of blocks under the player

Get help using Construct 2

Post » Fri Jun 27, 2014 7:05 am

Hello!

New question. I'm trying to make something like a bridge made of blocks (cloned from one object) and I want to change their animation or frame when he's on them and go back to normal when he steps away. I managed to make the effect I want but I don't know how to deactivate in one block only :S

How could I make blocks to turn on and off independently?

Thank you in advance!
B
5
S
1
Posts: 34
Reputation: 512

Post » Fri Jun 27, 2014 7:19 am

Hi. How did you change the animation/frame to get the effect?

The first thing that comes to my mind is a simple "on collision" when the player is on the object and an inverted event for setting it back to normal. Or "Is overlapping at offset" (which would be a few pixels above) could work. But I never used this event so I cant tell if this will work for sure.
Bl4ckSh33p-Soft - Custom Software and Indie Games
B
56
S
16
G
6
Posts: 743
Reputation: 9,310

Post » Fri Jun 27, 2014 7:38 am

Message: sirkame is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
I solved it easily. I was making a silly mistake. Just in case someone find it useful:
B
5
S
1
Posts: 34
Reputation: 512

Post » Fri Jun 27, 2014 7:45 am

The URL was removed. :(
How did you fix it?
Bl4ckSh33p-Soft - Custom Software and Indie Games
B
56
S
16
G
6
Posts: 743
Reputation: 9,310

Post » Fri Jun 27, 2014 8:03 am

Easy =)

Conditions:
System: For each BLOCK
Player: is overlapping BLOCK at offset 0,1

Action:
BLOCK: Set Animation Frame to 1
BLOCK: Set Solid on (this allows the character to step over the blocks, but if there's an enemy following you, he'll fall)

Now, to recover the state of a single block, it's just the same:

Conditions:
System: For each BLOCK
Player: is overlapping BLOCK at offset 0,1 (INVERT)

Action:
BLOCK: Set Animation Frame to 0
BLOCK: Set Solid off

Now I'm trying to do the same with a full animation. I'll be back :D

EDIT: Done!

If you want to use animation looping. First of all, of course, make the animation and set it on loop. Then, just change the action "animation frame" for "Start animation from beginning" in the NOT overlapping action line.
B
5
S
1
Posts: 34
Reputation: 512


Return to How do I....?

Who is online

Users browsing this forum: Bobbyneal100, Kin, mickclarke, sean080, tinhofiel, TRMG and 34 guests