Stop mouse clicks during Waits

Get help using Construct 2

Post » Thu Jan 05, 2012 7:52 am

Hi again!

This time I'm in big trouble, I want to disable the mouse click during Waits. I tried this by making a Global Variable Set to FALSE before "waiting", and the TRUE after the "waiting". But that doesn't seem to work.

Here's the example code. ClickReady (The Global Variable) is highlighted.



Please check my CAPICS HERElonrot2012-01-05 21:31:34
B
4
G
1
Posts: 53
Reputation: 708

Post » Thu Jan 05, 2012 11:20 am

You set the value of the variable to '1' both before and after the wait?
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Thu Jan 05, 2012 11:23 am

lonrotGame.capx

I simplified some stuff too
Last edited by Yann on Sun Sep 14, 2014 10:20 pm, edited 1 time in total.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Thu Jan 05, 2012 2:52 pm

Thanks Yann, you have saved me times already. I'm in the process of updating my newest version of the game with your cleaner code, I can set the local variable to IS Win but "not equal to" Win as you did in your version. What I'm missing?



EDIT: Found it, Right Click Invert.lonrot2012-01-05 16:57:57
B
4
G
1
Posts: 53
Reputation: 708

Post » Thu Jan 05, 2012 7:28 pm

I can't make the "loose" animation to show up, I have double checked and it should work to my end.

NOTE: The loose animation is triggered only if Retry (Global Value) is set to 1.


Here's the updated CAPICS

Please take a look lonrot2012-01-05 21:32:20
B
4
G
1
Posts: 53
Reputation: 708

Post » Thu Jan 05, 2012 8:16 pm

There's something wrong with the link.

Also when retry = 1 you start to play the animation, but you haven't actualy "Set animation" by its name.
That's probably what's missing if all the rest should work as intended.Kyatric2012-01-05 20:17:28
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Thu Jan 05, 2012 9:09 pm

You have an operator for "is not equal to"
instead of inverting the "System: Retry = 1" (don't know if it's the issue, the link is broken as Kyat said)
And remember, your link must start with http:// for it to be properly clickable.Yann2012-01-05 21:10:15
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Thu Jan 05, 2012 10:03 pm

Link fixed!!

Guys, I made both suggestions and it worked at some point, I can only see one frame of the entire animation and I suspect is the last frame. Tried various combinations but the animation remains frozen.

That animation has worked perfectly until now.




lonrot2012-01-05 22:34:13
B
4
G
1
Posts: 53
Reputation: 708

Post » Thu Jan 05, 2012 10:41 pm

I know why your animation isn't playing but I have two question:
1/ What do you want to use this retry for
2/ Why didn't you keep what I did (using the fade behavior instead of manymanymany animation frame) ?

(for the "why": adding 'trigger once' should avoid triggering the 'set animation from beginning' thus only showing the first frame every tick)Yann2012-01-05 22:42:36
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Fri Jan 06, 2012 12:44 am

Hey Yann

1) The framed animation repeated each time the ball collapsed, and my solution was to make the Boolean variable to avoid it.

2) I really like your solution, but is not possible to make it blur and zoom just like the framed animation. I can sacrifice a few kilobytes for that.

UPDATE: Trigger once, that's it! Thanks again Yann. One final thing, really! (I hope so). For some weird reason, the second time a ball is dropped, the Drop Icon becomes Green. Tried various things but I can't seem to get it right. For debugging purposes I set the Icon to Red(Wait) while the "Playing" variable is set to 1, and visceversa. Nothing changed thought.

Here's the current CAPX. Yes the link is working.

lonrot2012-01-06 00:51:09
B
4
G
1
Posts: 53
Reputation: 708

Next

Return to How do I....?

Who is online

Users browsing this forum: Kagubro, kentbakk and 20 guests