forums

TNT Basic Forums > Programming Q&A
Movement detection
< Last Thread     Next Thread >
Author
Thread        Post A Reply

02-28-2003 11:00

Posted by:
mark_667

Location:
England

Click Here to Email mark_667   Find more posts by mark_667

Hi,
I'm working on a (highly experimental) board based game. Because of this the computer cannot move until the player has, so I need a code to detect if a certain sprite has moved from it's start postion. I have tried:

If not sprite 1,100,100,128 then
AI()
end if

But this returns a syntax error. Do I need to use map co-ordinates instead of screen co-ordinates, or is it just another example of my bad coding?
I don't think Key press detection is not suited to this, as the user types in co-ordinates to move the sprite over the board and this could apply for any move, not just detecting the first to see if it should respond.

thanks,
Mark_667

03-01-2003 22:27

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

Did you try:

while ( execution=true )
movePlayer()
moveComputer()
draw frame
wend

03-02-2003 19:29

Posted by:
mark_667

Location:
England

Click Here to Email mark_667   Find more posts by mark_667

Hi,
Didn't try your suggestion originally but solved my own problem.

if 'Sees if player sprites are in original position
sprite 3,50,50,128 then
Move() 'Wait for player to move
else AI()
end if

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.