Ok I'm working on a car game at the moment, and I want to change the use of the up and down arrows. Right now I just have it going forward and reverse like Tanks. But I want to make it to where if you press up, it increases your speed of constant motion. I already tried this with walk() but that will not work with my turning code, it must work with step(). Anyone have any suggestions?
LJR
ID:154286
Feb 7 2002, 7:47 pm
|
|
Try this:
mob New() ..() anchor if(src.speed == 0) spawn(5) goto anchor step(src.dir) var/wait = client.Speed if(client.Speed > 10) wait = 10 spawn(11-wait) goto anchor client var/Speed = 0 NORTH() if(src.Speed < 15) src.Speed += 1 SOUTH() if(src.Speed > 0) src.Speed -= 1 |
In response to Lord of Water
|
|
Cool code snippets guys! I can find use for them in my StarTrek game - I needed something small to accelerate/decelerate the ship...
|
In response to White Flame
|
|
hey white flame your anme spazed out at the bottom lol
|
Everytime you press up, you will go faster..
This is just an idea, not sure if it would work.
Wħĭťë FļãΜê