How do I set frame +1

Get help using Construct 2

Post » Tue Sep 09, 2014 12:58 am

how to i :
mouse | on left button clicked on RightArrow | sprite | set animation frame to +1

for every left button click on LefftArrow , sprite change frame +1

vista vesta on leftarrow.. sprite change frame -1
B
17
S
7
G
7
Posts: 205
Reputation: 5,335

Post » Tue Sep 09, 2014 1:12 am

you have the way in your post



Event
On Left/right click

Action
set animation frame TO Whateversprite.andimationframe+1
Event
On right/left click

Action
set animation frame TO Whateversprite.andimationframe-1
B
42
S
17
G
2
Posts: 850
Reputation: 6,209

Post » Tue Sep 09, 2014 1:31 am

ah ty alot
and one more think.. can be when frame is end the frame begin from start again(loop)? when left mouse still left click ?
cause now when button left and the sprite have 5 frame the animation frame stop at 5.. can begin again from start?
B
17
S
7
G
7
Posts: 205
Reputation: 5,335

Post » Tue Sep 09, 2014 1:51 am

Edit the sprite. On the left of the main window is the Animation properties panel. You'll see "Loop" there. Set it to Yes.
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Tue Sep 09, 2014 2:16 am

not work :/
B
17
S
7
G
7
Posts: 205
Reputation: 5,335

Post » Tue Sep 09, 2014 2:48 am

Maybe use Compare frame = 5 Set frame to 0
B
22
S
6
Posts: 244
Reputation: 2,690

Post » Tue Sep 09, 2014 3:43 am

blackhornet wrote:Edit the sprite. On the left of the main window is the Animation properties panel. You'll see "Loop" there. Set it to Yes.

CBelle wrote:not work :/

It's supposed to work.
B
28
S
8
G
4
Posts: 553
Reputation: 4,924

Post » Tue Sep 09, 2014 4:28 am

everything everyone has said work but they all do different things because you have not been clear on what you want you keep saying you want different things so if you just explain exactly what you want to happen and then we can help you
B
42
S
17
G
2
Posts: 850
Reputation: 6,209

Post » Tue Sep 09, 2014 12:10 pm

loop does work for me... here the capx
Compare frame = 0
loop yes
1.. exacly : for every each Right Arrow pressed ...the sprite frame go 0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5 etc

2.. now for every each right arrow pressed .... the sprite go 0.1.2.3.4.5 and stop

i need the example 1
You do not have the required permissions to view the files attached to this post.
B
17
S
7
G
7
Posts: 205
Reputation: 5,335

Post » Tue Sep 09, 2014 1:11 pm

Use a modulo when "going up".
Use a check when "going down".

See the attached capx made in r179, link at the bottom of the page.
You do not have the required permissions to view the files attached to this post.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
292
S
115
G
96
Posts: 7,295
Reputation: 70,795


Return to How do I....?

Who is online

Users browsing this forum: farsen, Kyu and 43 guests