global.musicfile = musicdir+"2Pac vs Sonic Adventure - Hit Em Up(Red Hot Skull remix).mp3"
global.custommusic = 1
global.customdata[0] = background_add(datadir+"screenshot_2018-01-12_15-22-42.png",false,false)
global.customobject[0] = object_add() //you may now add events to this object/entity
globalvar konsti_left, konsti_right, konsti_walk_left, konsti_walk_right;
konsti_left = sprite_add(datadir+"spr_konsti_left.png",0,false,false,0,0)
sprite_set_offset(konsti_left,sprite_get_width(konsti_left)/2,sprite_get_height(konsti_left)/2)
konsti_right = sprite_add(datadir+"spr_konsti_right.png",0,false,false,0,0)
sprite_set_offset(konsti_right,sprite_get_width(konsti_right)/2,sprite_get_height(konsti_right)/2)
konsti_walk_left = sprite_add(datadir+"spr_konsti_walk_left_strip8.png",8,false,false,0,0)
sprite_set_offset(konsti_walk_left,sprite_get_width(konsti_walk_left)/2,sprite_get_height(konsti_walk_left)/2)
konsti_walk_right = sprite_add(datadir+"spr_konsti_walk_right_strip8.png",8,false,false,0,0)
sprite_set_offset(konsti_walk_right,sprite_get_width(konsti_walk_right)/2,sprite_get_height(konsti_walk_right)/2)
object_set_sprite(global.customobject[0],konsti_left)
object_event_add(global.customobject[0],ev_create,0,"alarm[0] = 45 vspeed = -1")
object_event_add(global.customobject[0],ev_alarm,0,"hspeed = irandom_range(-7,7); if hspeed < 0 then sprite_index = konsti_walk_left else if hspeed > 0 then sprite_index = konsti_walk_right; alarm[1] = irandom_range(5,45)")
object_event_add(global.customobject[0],ev_alarm,1,"hspeed = 0; if sprite_index = konsti_walk_left then sprite_index = konsti_left else if sprite_index = konsti_walk_right then sprite_index = konsti_right; alarm[0] = irandom_range(5,45)")
object_event_add(global.customobject[0],ev_step,ev_step_normal,"image_speed = speed/12; if place_free(x,y+1) {gravity = 0.35; direction = 270} else {gravity = 0 vspeed = 0}")
object_event_add(global.customobject[0],ev_collision,obj_solid,"if !place_free(0,+vspeed) {move_contact_solid(direction,12); vspeed = 0}")
object_event_add(global.customobject[0],ev_draw,0,"draw_self() if place_meeting(x,y,localPlayer) then {draw_set_halign(fa_center); draw_set_valign(fa_bottom); draw_text(x,y-24,'zooz#is good')}")
global.imgs = 1
global.objs = 1
