how would i make movementl ike on tanks?
im stumped..
ive tried alot of things. any help would be good
thanks
ID:179703
Nov 20 2001, 3:28 pm
|
|
In response to Pillsverry
|
|
how would i make movementl ike on tanks? It looks like you're thinking along the right lines, but just have a few details off. Here are a couple hints to get you going: To move the object in its current direction: M.Move(get_step(M, M.dir)) To rotate the object 45 degrees clockwise: M.dir = turn(M.dir, -45) Good luck! |
In response to Gughunter
|
|
Gughunter wrote:
M.Move(get_step(M, M.dir)) Or simply Step(M,M.dir) ;) |
this is my code:
client
South()
if(usr.dir == NORTH)
step(usr,SOUTH)
if(usr.dir == SOUTH)
step(usr,NORTH)
if(usr.dir == WEST)
Move(usr,EAST)
if(usr.dir == EAST)
Move(usr,WEST)
West()
usr.dir += turn(WEST, 45)
North()
step(usr,usr.dir)
East()
usr.dir += turn(EAST, 45)
i know its crap but i tried