Pages: 1
Topic closed
I'm making a puzzle/strategy game with 100 squares in a 10x10 array. when you click on a square, that square and the 8 surrounding it change color. The goal is to get all the squares black. I'm having trouble with my "mix up" button. I put in this script and it's not doing what I thought it would do:
http://yourimg.in/m/j594hf4.gif
(I don't know how do display the actual image so I used YourIMG)
The script is supposed to select one square and change it's color and the surrounding squares' colors. I' not sure what I did wrong.
Offline
mrshanko wrote:
I'm making a puzzle/strategy game with 100 squares in a 10x10 array. when you click on a square, that square and the 8 surrounding it change color. The goal is to get all the squares black. I'm having trouble with my "mix up" button. I put in this script and it's not doing what I thought it would do:
http://yourimg.in/m/j594hf4.gif
(I don't know how do display the actual image so I used YourIMG)
The script is supposed to select one square and change it's color and the surrounding squares' colors. I' not sure what I did wrong.
To make it an image surround it in [img] and [/img] tags.
Offline
There you go. Depends what you're wanting it to broadcast: a number or a string.
Offline
AtomicBawm3 wrote:
There you go. Depends what you're wanting it to broadcast: a number or a string.
Exactly what I was about to say...
Could you upload the project and post a link?
Last edited by Greenatic (2011-09-15 19:34:52)
Offline
Greenatic wrote:
AtomicBawm3 wrote:
http://yourimg.in/m/j594hf4.gif
There you go. Depends what you're wanting it to broadcast: a number or a string.Exactly what I was about to say...
Could you upload the project and post a link?
I'll do that later.
Offline
Hmm, that seems overly complicated.
I'll take a look at the project, and see if there's an easier way.
Edit: The mix up button seems to be working, it just takes a really long time to finish. There's a much easier way; I'll make a script for you.
Last edited by hmnwilson (2011-09-17 15:06:06)
Offline
It seems to be working offline. Is the problem that it seems to be never-ending? If so, try taking out the repeat 500 loop.
Offline
Here you go, now it should work.
Offline
hmnwilson wrote:
Here you go, now it should work.
I tried that before:
<when I receive[ Mixup! ]
<repeat( 100 )
<broadcast[ <join( <pick random( 1 )to( 10 ) ( <join( - ) ( <pick random( 1 )to( 10 )
___________________________________________________________________________________
This is exactly the same thing. When you broadcast the name of a square, it changes color. I want a script where one square changes color and so do the 8 around it repeatedly. If each square changes independently, he state of the puzzle could become unsolvable.
Offline
mrshanko wrote:
hmnwilson wrote:
Here you go, now it should work.
I tried that before:
<when I receive[ Mixup! ]
<repeat( 100 )
<broadcast[ <join( <pick random( 1 )to( 10 ) ( <join( - ) ( <pick random( 1 )to( 10 )
___________________________________________________________________________________
This is exactly the same thing. When you broadcast the name of a square, it changes color. I want a script where one square changes color and so do the 8 around it repeatedly. If each square changes independently, he state of the puzzle could become unsolvable.[/blocks]
Whoops, I completely missed that...
Let me try that again. It might take a few minutes.
Edit: OK, I've spent a bit of time with this. Your way works, but as you've probably noticed, it's completely broken online. You can use it, you just need to tell the viewer they have to download it.
However, I've updated my version of the project (here) with a whole new script, and it works online. Don't feel obligated to use it, but if you want to, that's totally fine.
Last edited by hmnwilson (2011-09-17 16:50:39)
Offline
Topic closed
Pages: 1