GameMaker Button Jump with Draw_gui // Side Scroller Game NEED HELP

S

sejan

Guest
Hello guys I am new to programming and would love your help.
I have a player_obj and button_obj.

In player_obj i have set vspeed = 5 so the player goes down.

In obj_button Step ===
var pos_on_button = position_meeting(device_mouse_x_to_gui(0),device_mouse_y_to_gui(0),self)

if (device_mouse_check_button_pressed(0,mb_left) && pos_on_button) {
Jump code;
}

Draw GUI ==== draw_self();

Please help me find a logic so i can make my player jump using the draw button.
 
Last edited by a moderator:

Nidoking

Member
Do you understand how to use dot notation to refer to a variable in another instance? Or how to use with? Either of those will do the job.
 
Top