Page 1 of 1

place checking question

PostPosted: Tue Feb 21, 2006 6:18 pm
by Troodon
Hi,
How can one actor check if there is another actor in one place. (oh no, I don't know how to explain it!)
I mean that if for example there is that X & 0 game where you must try to have 4 X or 4 0 in the same line. How can I make the program check if there is 4 X's in the same line or in the same colum etc? I hope somebody catched what I mean.

PostPosted: Wed Feb 22, 2006 2:46 pm
by makslane
You can use the getactor function to test

PostPosted: Wed Feb 22, 2006 2:47 pm
by Troodon
What's getactor and how it works?

PostPosted: Wed Feb 22, 2006 2:54 pm
by makslane

PostPosted: Wed Feb 22, 2006 2:55 pm
by Troodon
I looked from documentation but I didn't understand how could it help me.

PostPosted: Wed Feb 22, 2006 2:57 pm
by makslane
The getactor funcion will returns the actor in the given position.
So, you can test if in the position (0, 0), (0, 10)... has the actor X or 0

PostPosted: Wed Feb 22, 2006 2:59 pm
by Troodon
Thanks, but can I check also if there is 4 X's or 0's in the same line?

PostPosted: Wed Feb 22, 2006 5:18 pm
by makslane
You need check the places and use a variable to count!

PostPosted: Thu Feb 23, 2006 7:56 am
by Troodon
Ok. Thank you! :D