LOGIN
SEARCH
PROFILE
keys: ↑ ↓
LOGOUT
INDEX
MEMBERS
keys: ↑ ↓
HOME
PORTAL
PLAY ALONG
PLAY with WORDS
PLAY with GRAPHICS
PLAY with SOUNDS
PLAY with CODES
PLAY with PROJECTS
keys: ← →
Guest Access
Register:
Members:



View previous topic View next topic Go down Message [Page 1 of 1]

ACTIVATED
ACTIVATED
#1 Car system
Loading

shogun3

ACTIVATED
ACTIVATED
ACTIVATED
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




Embarassed
ACTIVATED
Show Signature
ACTIVATED
EVENTALIST
EVENTALIST
#2 Re: Car system
Loading

mr_wiggles

avatar
EVENTALIST
 EVENTALIST
EVENTALIST
profile
shogun3 wrote:
Hope wiggles reads this

i read it Smile

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
#3 Re: Car system
Loading

shogun3

ACTIVATED
ACTIVATED
ACTIVATED
profile
mr_wiggles wrote:
shogun3 wrote:
Hope wiggles reads this

i read it Smile

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

Sponsored content

profile

View previous topic View next topic Back to top Message [Page 1 of 1]

 

Chatbox system disabled
Personal messaging disabled