box changes colour and number in order

Get help using Construct 3!

Post » Sat Jul 01, 2017 11:52 pm

im trying to figure out how to create a box changes colour in order and while changing colour its number also changes.for example; a box has a 34 number on it, when it collides with enemy, for every enemy he decrease number and changes colour depends on number. is this even possible in construct 2 ? lol or help me pls ty^^
B
4
S
1
Posts: 3
Reputation: 306

Post » Sun Jul 02, 2017 12:53 am

It's possible in construct 2..and 3...this forum is for 3 ,what are you using? Give the box an instance variable and set it to 34. Use an event, box on collision with enemy, subtract 1 from instance variable. Set up 34 animation frames on the box, each looking like how they should for each number, that is showing both the number and the colour. Then have the box set to display the animation frame that the instance variable is currently set to, i.e if 34 then show frame 34, if 33 then show frame 33. Box set current animation frame to instance variable. I think this would solve both the number and colour at the same time. My explanation may come across as long-winded but this can be done in only 2 events once your box is set up with the graphics.
B
46
S
16
G
74
Posts: 2,092
Reputation: 44,193

Post » Sun Jul 02, 2017 2:53 pm

i tried to do simple 1 ball and 1 object (2 frame) colliding each other in CT3.

object has 2 frames :
pictures number 1 and number 2 on them

added number 2 an instance variable =2
// when i set frames in animation of number 2 , 0th frame is 2, 1st frame is number 1

in events i tried so many things but it keeps changing frame without collision. maybe cause of repeat count? we cant make it 0, always 1 .

could get the logic of using animation frame , variable and collision together.

by the way i'm trying to make "snake vs block" like project.
B
4
S
1
Posts: 3
Reputation: 306

Post » Sun Jul 02, 2017 10:36 pm

This is far too confusing, you'll have to post a screenshot of the events or something.
B
46
S
16
G
74
Posts: 2,092
Reputation: 44,193


Return to How do I...?

Who is online

Users browsing this forum: Bootfit and 2 guests