V
Verilyzed
Guest
Hi,
My Name is Colin and my Game doesnt work as I like.
I got a simple way to move my object. Also i got a simple way to jump.
Objects that you Need to know:
obj_left (to walk to left)
obj_right (to walk to right)
obj_up (to jump)
obj_player (player)
Walk Way:
In both objects is one simple text in "Left Button" Event: "obj_player += 5;" and "obj_player -= 5;"
Jump Way:
Create: j = 0;
Step:
///Step Event
//On Screen
if (global.SETTINGcontrol == 0) <-- This you can Ignore. Its for postion and controll setting
{
x = view_xview[0] + 1024;
}
//Jumping Effect
if (j >= -10) j -= 1;
obj_player.y -= j;
if (obj_player.y >= global.ybottom)
{
obj_player.y = global.ybottom;
j = 0;
}
Left Button:
if (obj_player.y == global.ybottom)
{
j = 12;
}
And if I want to walk it works and if i want to jump it works.
BUUUT if i want to walk AND Jumping in walk it doesnt work!!! The object is only moving on x-postion and not Jumping.
Anyone know how to solve?
My Name is Colin and my Game doesnt work as I like.
I got a simple way to move my object. Also i got a simple way to jump.
Objects that you Need to know:
obj_left (to walk to left)
obj_right (to walk to right)
obj_up (to jump)
obj_player (player)
Walk Way:
In both objects is one simple text in "Left Button" Event: "obj_player += 5;" and "obj_player -= 5;"
Jump Way:
Create: j = 0;
Step:
///Step Event
//On Screen
if (global.SETTINGcontrol == 0) <-- This you can Ignore. Its for postion and controll setting
{
x = view_xview[0] + 1024;
}
//Jumping Effect
if (j >= -10) j -= 1;
obj_player.y -= j;
if (obj_player.y >= global.ybottom)
{
obj_player.y = global.ybottom;
j = 0;
}
Left Button:
if (obj_player.y == global.ybottom)
{
j = 12;
}
And if I want to walk it works and if i want to jump it works.
BUUUT if i want to walk AND Jumping in walk it doesnt work!!! The object is only moving on x-postion and not Jumping.
Anyone know how to solve?