ID:176978
![]() Nov 23 2002, 12:39 pm
|
|
anyone know a snippet to make a car(or just the main player mob) move forward when pressing up and steer left and right when pressing the according keys, you know like a gta 2 car,
|
![]() Nov 23 2002, 12:48 pm
|
|
or if not, like the car code in GTA on byond. but the first one is prefered
|
Do you want pixel movement or tile based movement? Unless you know some trigonometry I suggest you stick with tile-based movement. For tile-based movement you could make client.North() move you in the direction you are facing, and East() and West() would turn you 45 degrees left or right. You could use: client.North() (East and West too), the step() proc, and the turn() proc
|
You will have to fill in the blanks, but it tells you what pre-defined procs to call. You would just have to look them up in the DM help.
<code> client North() //step forward //usr the step() proc East() //turn right 45 degrees //use the turn() proc West() //turn left -45 degrees //use the turn() proc South() //optional, step backwards (reverse) //i would use the step() proc and the turn proc inside //of it to step the player their dirction turned 180 degrees </code> |
client
North() East() West() mob proc North() step(src,forward) <-- i dont know!! mob proc East() mob proc West() i really dont understand how to do this, ive never worked with anything like this before |