Toggling frame on left click not working

Get help using Construct 2

Post » Sun Oct 04, 2015 12:03 pm

Image

for whatever reason, the image wont toggle when i click on the sprite (Sprite6).
The playMusic var doesn't toggle either, but i figure if i find out how to fix one i can probably fix the other.
Does anyone know why this wont work?
B
6
S
1
Posts: 46
Reputation: 492

Post » Sun Oct 04, 2015 12:21 pm

Image broken. What is your code for the toggle? Can you post a .capx? Probably an easy fix.
B
28
S
5
G
1
Posts: 62
Reputation: 2,392

Post » Sun Oct 04, 2015 1:03 pm

You are linking to the page instead of the image, copy the image url instead..

Image

Issue is, after event 2 has run, event three will allways run, because it's conditions are immediately true that tick.
So one way to solve this would be putting the animationframe check as a subevent and using an else statement.

Another would be having a boolean variable on sprite6 and toggle it on left click, after which you could check the boolean and set the animation-frame accordingly..
Last edited by LittleStain on Sun Oct 04, 2015 1:05 pm, edited 1 time in total.
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 » Sun Oct 04, 2015 1:05 pm

Mike Mead wrote:Image broken. What is your code for the toggle? Can you post a .capx? Probably an easy fix.

On Left Button Clicked on Sprite 6
and Animation frame = 0 - Set animation Frame 1

On Left Button Clicked on Sprite 6
and Animation frame = 1 - Set animation Frame 0

That's literally all it is
B
6
S
1
Posts: 46
Reputation: 492

Post » Sun Oct 04, 2015 1:05 pm

Image
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Sun Oct 04, 2015 1:40 pm

korbaach wrote:Image


how did you nest them like that? if i try dragging else into the left click event it doens't let me
B
6
S
1
Posts: 46
Reputation: 492

Post » Sun Oct 04, 2015 2:03 pm

Image
Image
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Sun Oct 04, 2015 7:41 pm

korbaach wrote:Image
Image


ok it worked! thanks so much :D
B
6
S
1
Posts: 46
Reputation: 492


Return to How do I....?

Who is online

Users browsing this forum: facecrime and 7 guests