Guest Access
ACTIVATED
ACTIVATED
ACTIVATED
profile
shogun3
profile
I was trying to create a car system with accelleration (there are couple of scripts out there but they don't work with the custom ones I use), in which for instance you accelerate and move forward by pressing up, break by pressing x, move backward by pressing down, turn 45 degrees left while pressing left and turn 45 right by pressing right.
The problem is that it's not possible to turn 45 degrees left or right, so I tried with a gimmick, when everytime button left (or right) is pressed it adds 1 to variable 1 so you can gradually turns and when up is pressed it moves to the direction memorized by the variable.
Example (assuming the character is facing left):
if Variable 1=0
if button left is pressed
wait 4 frames
set mouve route: change graphic (sprite facing lower left)
variable 1=1
wait for movement completion
end
end
if Variable 1=1
if button left is pressed
wait 4 frames
set mouve route: change graphic (sprite facing down)
turn down
variable 1=2
wait for movement completion
end
end
and so on...
Then...
if Variable 1=1
if button up is pressed
set mouve route:
move down
and so on...
The problem is that the character turns just fine, but only moves when left is not pressed anymore. If I try to move by pressing up and left together (attempting to turn and move at the same time) it wouldn't work.
Hope wiggles reads this
The problem is that it's not possible to turn 45 degrees left or right, so I tried with a gimmick, when everytime button left (or right) is pressed it adds 1 to variable 1 so you can gradually turns and when up is pressed it moves to the direction memorized by the variable.
Example (assuming the character is facing left):
if Variable 1=0
if button left is pressed
wait 4 frames
set mouve route: change graphic (sprite facing lower left)
variable 1=1
wait for movement completion
end
end
if Variable 1=1
if button left is pressed
wait 4 frames
set mouve route: change graphic (sprite facing down)
turn down
variable 1=2
wait for movement completion
end
end
and so on...
Then...
if Variable 1=1
if button up is pressed
set mouve route:
move down
and so on...
The problem is that the character turns just fine, but only moves when left is not pressed anymore. If I try to move by pressing up and left together (attempting to turn and move at the same time) it wouldn't work.
Hope wiggles reads this
ACTIVATED
Show Signature
ACTIVATED
EVENTALIST
EVENTALIST
EVENTALIST
profile
i read it
whats all going on just a car game correct? or you want it to be like a vehicle you can hop in and drive around then hop out?
you think you can PM me with what you got so i cant take a look at your event system.
mr_wiggles
profile
shogun3 wrote:
Hope wiggles reads this
i read it
whats all going on just a car game correct? or you want it to be like a vehicle you can hop in and drive around then hop out?
you think you can PM me with what you got so i cant take a look at your event system.
EVENTALIST
Show Signature
EVENTALIST
ACTIVATED
ACTIVATED
ACTIVATED
profile
it's just a car game, I'm sending you a little demo, so far only the up and left button are taken care of, but it's not working very well.
shogun3
profile
mr_wiggles wrote:shogun3 wrote:
Hope wiggles reads this
i read it
whats all going on just a car game correct? or you want it to be like a vehicle you can hop in and drive around then hop out?
you think you can PM me with what you got so i cant take a look at your event system.
it's just a car game, I'm sending you a little demo, so far only the up and left button are taken care of, but it's not working very well.
ACTIVATED
Show Signature
ACTIVATED