Hi guys!
Please help me out here. I have constructed a simple Newtonian like situation in which you can make the box accelerate and decelerate, however once in acceleration the program needs to be aware of other key inputs so that it can decelerate when I want it to. Currently you'll have to wait until the reference speed has been reached before you can input another command.
Does anyone have tips on how to make the program check for keyinputs all the time?
Many thanks!
make object box 1, 10, 10, 10
ref_spd# = 0
act_spd# = 0
START:
rem starting main loop en er wordt voor gezorgd dat de
rem waarde in een eventuele scan wordt aangehouden.
DO
move object 1,act_spd#
rem nu moeten we de thrust settings definieren en aan de
rem hand van een reference speed de actual speed laten
rem oplopen tot de actual speed gelijk is aan de ref spd
rem Waiting for input
print "Actual Speed: ",act_spd#
print "Reference Speed Set: ",ref_spd#
rem Assessing the input and commencing action...
TS01:
IF UPKEY()=1
ref_spd# = 1
REPEAT
print "Actual Speed: ",act_spd#
print "Reference Speed Set: ",ref_spd#
move object 1, act_spd#
act_spd# = act_spd# + 0.001
UNTIL act_spd# => 1
ENDIF
TS00:
IF DOWNKEY()=1
ref_spd# = 0
REPEAT
print "Actual Speed: ",act_spd#
print "Reference Speed Set: ",ref_spd#
move object 1, act_spd#
act_spd# = act_spd# - 0.001
UNTIL act_spd#
Yskonyn -
"It's better to wish down here you were up, then to wish up there you were down."
"The ONLY time you have too much fuel on board is when you are on fire."