I tried implementing the structure you suggested me at it works! ... Kinda. I seem to have two problems. Although the rocket shoots while moving (touching the middle screen while holding onto either left or right side of the screen), rocket stops moving and shooting at the same while rocket is decelerating (only touching the middle screen while my rocket still moves slowly to deaccelerate). My rocket sprite gradually slows down when the screen is not pressed and when I tap on the middle button while it slows down, the rocket abrutly stops to shoot and continues to deaccelerate while I want it to continually to deaccelerate while shooting. Another problem I'm having is that when I press the left side and the right side of the screen at the same time, the rocket actually speeds up. Is there a way to check two touches in the touch event first, then do something instead of looking at it one by one? Thank you!
My trimmed down code:
if GetRawTouchCount(1) = 0
//slow down gradually
endif
touch = GetRawFirstTouchEvent(1)
while touch > 0
x# = GetRawTouchCurrentX(touch)
value = GetRawTouchValue(touch)
if value > 0
if value = 1
//go right
elseif value = 2
//go left
endif
if value = 3
//fire missile
endif
endif
if value = 0
if x# is left of the screen
SetRawTouchValue(touch, 1)
elseif x# is right of the screen
SetRawTouchValue(touch,2)
elseif x# is center of the screen
SetRawTouchValue(touch,3)
endif
endif
touch = GetRawNextTouchEvent()
endwhile