L
Loafwad
Guest
I am trying to make it so when I press E (for now) I am able to control my boat using WASD
Any help would be greatly appreciated
this is my messy code that I have formulated over many failed attempts
And is what i have been closest to achieve what i want where the boat does not move when I am not inside it
Any help would be greatly appreciated
this is my messy code that I have formulated over many failed attempts
And is what i have been closest to achieve what i want where the boat does not move when I am not inside it
Code:
sail_sp = 0;
scr_getinput();
if key_E
{
state = state.boat
}
if state = state.boat
{
sail_sp = 4;
if key_up
{
y -= sail_sp;
}
if key_down
{
y += sail_sp;
}
if key_right
{
x += sail_sp;
}
if key_left
{
x -= sail_sp;
}
}