Pages: 1
Topic closed
So far I have been able to fix any problems through other forum posts or videos but I am a bit stuck.
I am trying to display the amount of darts available to throw (6 in total). I have set up a variable for how many times the mouse is clicked and set it up so that the correct number of clicks should hide the corresponding dart on display but it os not working.
Here is the script
when gf clicked if <(mouse clicked)> = [1]> hide end endand the game so far.
Offline
when gf clicked forever wait until <not <mouse down?>> wait until <mouse down?> change [mouse clicked] by (1) endThat should keep track of clicks.
when gf clicked set [mouse clicked] to (0) wait until <(mouse clicked) > (6)> hidewill make the dart hide.
Offline
Worked great. Thank you.
Offline
On another note - if you test the game, all balloons pop more or less true but the purple one pops very inconsistantly despite having the same script. Any ideas?
Offline
The center of the purple balloon costume is pretty far away from the balloon, so the mouse is often further than 50 away, even when it is on the balloon. Go to the costume and click "set costume center" and click the center of the balloon. A few of your balloons' centers are off, so you should probably do the same to each balloon.
Last edited by MoreGamesNow (2012-03-25 17:46:47)
Offline
Thanks. I tried looking for that feature but I couldn't see it. Little more persistance needed. I wondered why a few of them were more hit and miss. Double thanks.
Offline
MoreGamesNow wrote:
when gf clicked forever wait until <not <mouse down?>> wait until <mouse down?> change [mouse clicked] by (1) endThat should keep track of clicks.when gf clicked set [mouse clicked] to (0) wait until <(mouse clicked) > (6)> hidewill make the dart hide.
Better way: Also improves performance.
when gf clicked set [mouse clicked v] to [0] repeat until <(mouse clicked) > (6)> wait until <not <mouse down?>> wait until <mouse down?> change [mouse clicked v] by (1) end hide
Last edited by Splodgey (2012-03-26 12:14:36)
Offline
Phantom_yo wrote:
Thanks. I tried looking for that feature but I couldn't see it. Little more persistance needed. I wondered why a few of them were more hit and miss. Double thanks.
Edit the costume, and you'll notice a button below the colors.
Offline
Splodgey wrote:
Better way: Also improves performance.
when gf clicked set [mouse clicked v] to [0] repeat until <(mouse clicked) > (6)> wait until <not <mouse down?>> wait until <mouse down?> change [mouse clicked v] by (1) end hide
But there are multiple darts. My second script can be copied into the darts, and the first script keeps track of the clicks. Yours would need to include something similar to mine in all of the darts but one anyway (though yours is, admittedly, a bit more efficient for the dart that it is in).
Offline
Topic closed
Pages: 1