How do I can do animation by controlling with the mouse

Get help using Construct 2

Post » Fri Jul 10, 2015 4:57 pm

I am a newbie (Construct 2/ free edition) and trying to do the animation, which is controlled by mouse.
My first string :)
Note::: Sprite2 - it's animation from few frames (loop).
Red sprite - zero (empty)

Image

Cursor moving to left and animation plays. It works fine.
But when I add the second string, the animation disappears. It works, but in another way.
Note::: Sprite2 - it's animation from few frames (loop).

Image

If the cursor to the left, I have now the first frame of the first animation if to the right - the first frame of the second animation. Animation don't work.
I tried different ways, but it shows only 2 pictures.
I hope for your help, what can I change or add to it to work properly. Thanks in advance
B
3
Posts: 3
Reputation: 181

Post » Fri Jul 10, 2015 6:02 pm

You are constantly spawning different objects at the same place over and over again depending on the position of the mouse.

What is it exactly that you are trying to do and it's not working?
B
17
S
7
Posts: 277
Reputation: 2,514

Post » Fri Jul 10, 2015 6:49 pm

In this case cursor to left from red sprite - an animation, to right - another. What don't you understand?
when there is one first string - animation is working (play all frames). If I add second string - I have to left 1 frame only (first animation), to right - first frame from another animation. What I have to do that all the frames from both animation play?
I feel like a fool :( to repeat my post again
B
3
Posts: 3
Reputation: 181

Post » Fri Jul 10, 2015 7:01 pm

You are aware that you are spawning a sprite every tick, which is about 60 sprites per second?

I guess what you'd like to do is X>mouse.x - set animation
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 Jul 11, 2015 7:48 am

LittleStain, thanks. It's working, but strangely a little :)
OK, I'll try to undestand logic of the program
B
3
Posts: 3
Reputation: 181


Return to How do I....?

Who is online

Users browsing this forum: SputnikCZ and 3 guests