I set sprite Frame Number, but just runs to end on start.

Get help using Construct 2

Post » Tue Aug 09, 2016 11:31 pm

So I have 4 duplicated sprites for control drag method.
I have 4 frames of animation, just 0=blue,1=red,2=green,3=yellow.
I set each one to a different frame number, but when I launch game they all turn yellow which is the last frame I assume
that's what it's doing. But I don't know why.
Thanks in Advance. 8-)

I even started a new capx.
B
31
S
13
G
1
Posts: 41
Reputation: 2,958

Post » Tue Aug 09, 2016 11:57 pm

I assume they have the same name and are 4 of the same object in which case updating animation will update for all. You need to create 4 separate objects (right click-clone object type) and they can have separate animations. Alternatively you can pick by UID of the 4 objects and set different animations that way. If you've done something different to this then please post a screenshot of the events.
B
46
S
16
G
79
Posts: 2,170
Reputation: 46,857

Post » Wed Aug 10, 2016 12:21 am

Yep that's what I did, same name, same object, I will try making them individual.
But question,
What If I just want to make a simple 2 frame sprite button that you click and it switches?
You know like the normal two image web button thing, how should I do that?
B
31
S
13
G
1
Posts: 41
Reputation: 2,958

Post » Wed Aug 10, 2016 12:23 am

On clicked
If frame0 > Wait 0.1s > Set frame1
If frame1 > Wait 0.1s > Set frame0

Something like that you mean?
If you're just using a single object you can use 'Compare Frame' > 'Set Frame'
The wait is so that the variables don't try to change each other at the same time and you get stuck in a loop.
B
46
S
16
G
79
Posts: 2,170
Reputation: 46,857

Post » Wed Aug 10, 2016 3:20 am

Ok, Thank you for the Help.
B
31
S
13
G
1
Posts: 41
Reputation: 2,958

Post » Wed Aug 10, 2016 4:02 am

I always just set the animation speed to 0 for something I need to stay the same frame.
Eh, Steve!
B
115
S
54
G
13
Posts: 112
Reputation: 16,150

Post » Wed Aug 10, 2016 7:48 am

thanks @calebbennetts,
heres what I'm doing now.

Image
B
31
S
13
G
1
Posts: 41
Reputation: 2,958


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 20 guests