Search found 10 matches
- Wed Jan 07, 2015 4:22 pm
- Forum: Games
- Topic: Snakes and ladders game
- Replies: 27
- Views: 24522
Re: Snakes and ladders game
For the variables, all you need to do is make them global. So if you're using your card script, at the top put 'Global' followed by the variable(or variables) you want to make global. To use them within buttons, make sure you declare them global in both the card and the button scripts, and if using ...
- Tue Jan 06, 2015 8:29 pm
- Forum: Games
- Topic: Simulating captured pieces
- Replies: 16
- Views: 14083
Re: Simulating captured pieces
I tried out what you said, and it worked, so the program is getting stuck in the repeat loop. Thanks for your help Klaus!
- Tue Jan 06, 2015 7:13 pm
- Forum: Games
- Topic: Simulating captured pieces
- Replies: 16
- Views: 14083
Re: Simulating captured pieces
Thanks for your quick reply Klaus. Yes, Fanorona_board[currentX][currentY][name_] should at some point become Black Piece.png. The name of the blank button in the 2D array will be 'Blank.png' for example, while White and Black ones are 'White Piece.png' and 'Black Piece.png' respectively, so sooner ...
- Tue Jan 06, 2015 6:32 pm
- Forum: Games
- Topic: Simulating captured pieces
- Replies: 16
- Views: 14083
Re: Simulating captured pieces
In case anyone would need it, here's the code I'm working with to try and get the capturing working, but causes livecode to stop responding. on capturingmove repeat until fanorona_board[currentX][currentY][name_] = "Black Piece.png" put fanorona_board[var_piece_1][row] into startX put fanorona_board...
- Sun Jan 04, 2015 11:31 pm
- Forum: Games
- Topic: Simulating captured pieces
- Replies: 16
- Views: 14083
Re: Simulating captured pieces
Thanks for the quick reply Jacque. In my program, that isn't how it's displayed, I simply put the comments in to make it absolutely clear what the variables/custom properties were to avoid any confusion. I'm sorry if it came across the wrong way.
- Sun Jan 04, 2015 8:46 pm
- Forum: Games
- Topic: Simulating captured pieces
- Replies: 16
- Views: 14083
Re: Simulating captured pieces
Hey Klaus, thanks for your quick reply. I've fixed the errors you pointed out, but when I try to 'move' a black piece to an open space, the program still stops responding altogether. I'm not sure what about it is causing the program to crash.
- Sun Jan 04, 2015 5:01 pm
- Forum: Games
- Topic: Simulating captured pieces
- Replies: 16
- Views: 14083
Re: Simulating captured pieces
Thanks again for the suggestions. I've produced some code to try and implement it. It's not worked so far, so I'd really appreciate it if anyone could help me refine this and iron out the faults? if the ispieceblack //status of a piece as black of var_piece_1 //the first piece clicked and the one to...
- Sat Jan 03, 2015 10:06 pm
- Forum: Games
- Topic: Simulating captured pieces
- Replies: 16
- Views: 14083
Re: Simulating captured pieces
Thanks for the replies. I'll try your suggestions and see what happens from there. I've not used code like this before so I apologize if I'm acting like a noobie. I feel I should have uploaded this from the beginning, but here's how the 2Darray I mentioned for my "Reset" button is structured: on boa...
- Sat Jan 03, 2015 3:44 pm
- Forum: Games
- Topic: Simulating captured pieces
- Replies: 16
- Views: 14083
Re: Simulating captured pieces
Thanks for the reply, but it's not actual movement I'm using here, so I'm not sure if that would still apply; for example, if a black piece is selected and then a blank one, the blank one changes skin to black, while the black one swaps to black, so it's not actual movement but it looks like it. I u...
- Thu Jan 01, 2015 8:44 pm
- Forum: Games
- Topic: Simulating captured pieces
- Replies: 16
- Views: 14083
Simulating captured pieces
Hey everyone. I'm trying to create a game called Fanorona, and it has a strange way of capturing pieces. Basically, if a black piece moves into an open space, then all the white pieces in the direction it moved in(I.E upwards in a straight line, left or right in a straight line or diagonally)will be...