Untitled
unknown
plain_text
a month ago
519 B
2
Indexable
var grounded = place_meeting(x, y + 1, _tilemap); if (place_meeting(x, y + 1, obj_crate)) { obj_crate.hsp = 0; // second check, to drag the box along if overlap if(place_meeting(x, y, obj_crate)) { obj_crate.hsp = hsp * hspWalk; } // provide a window to jump if (keyboard_check_pressed(ord("W"))) { vsp += vspJump allow_jump_duration = 20; } // stop vertical movement when not jumping if (allow_jump_duration <= 0) { vsp = 0; y -= grv; } } allow_jump_duration -= 1;
Editor is loading...
Leave a Comment