B
bctype108
Guest
I have run into a little problem trying to create a game engine in Gamemaker:Studio and decided to come here for help. Basically the function I am trying to create is tds_move. It would work like this:
So for example:
So heres what I have in the script:
So the problem I am having is getting keyboard_check to recognise the argument as the key to check...
Code:
tds_move(key_up, key_down, key_left, key_right, spd)
Code:
tds_move(vk_up, vk_down, vk_left, vk_right, 5)
Code:
///tds_move(key_up, key_down, key_left, key_right, spd)
key_up = keyboard_check(argument0)
key_down = -keyboard_check(argument1)
key_left = -keyboard_check(argument2)
key_right = keyboard_check(argument3)
yspeed = key_up+key_down*spd
xspeed = key_left+key_right*spd