Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
GameMaker Jason
20
Years of Service
User Offline
Joined: 22nd Nov 2003
Location: UK
Posted: 11th Feb 2004 23:55
I've read through HM's tut and want to make a function that will show the piece in the square clicked on the left and it array location (my array is dim board(7,7) for an 8*8 grid) any sugestions?

here is my code.



Thanx for any help.

GameKit
21
Years of Service
User Offline
Joined: 6th Mar 2003
Location: USA, Staring Blankly at a Computer
Posted: 12th Feb 2004 01:16 Edited at: 12th Feb 2004 01:17
well... first of all, make sure you don't put a DIM statement inside a loop. Call it once near the top of your code and then assign values to the array...

for a function... you could try something like...

and you could call the function with...

If mouseclick()=1 Then GridPosition(MouseX(),MouseY())

well... I hope that helps...

Edit: Not sure if my math is right

Do not thwart the way of the dragon. For thou tasteth like chicken.
GameMaker Jason
20
Years of Service
User Offline
Joined: 22nd Nov 2003
Location: UK
Posted: 13th Feb 2004 11:50
could you explain the col=int, row=int peice=board please?

Login to post a reply

Server time is: 2024-09-21 20:56:39
Your offset time is: 2024-09-21 20:56:39