ludum-dare-23/objects/obj_girl/Step_0.gml

133 lines
2.4 KiB
Plaintext
Executable File

global.poweredup -= 1
if global.girlhp < 1
{
if taggers = 0
{
global.death = 300
taggers = 1
instance_destroy()
}
}
if keyboard_check(vk_escape)
{
sound_stop_all()
game_restart()
}
global.bombtier += .2
if global.bombtier >= 100 and tagger = 0
{
sound_play(snd_bombready)
tagger = 1
}
if global.bombtier > 100
{
global.bombtier = 100
}
if score > 50000*lifetag
{
global.girlhp += 1
lifetag += 1
global.extend = 120
sound_play(snd_extend)
}
if keyboard_check(vk_up)
{
tagy -= 6
}
if keyboard_check(vk_down)
{
tagy += 6
}
if keyboard_check(vk_left)
{
tagx -= 6
}
if keyboard_check(vk_right)
{
tagx += 6
}
if keyboard_check_pressed(ord("C"))
{
sound_play(snd_directionswitch)
if shotdir = -1
{
shotdir = 1
}
else
{
shotdir = -1
}
}
if keyboard_check(ord("Z"))
{
if shot_yes = 1 and instance_exists(obj_girl)
{
iii = instance_create(x,y,obj_shot)
with (iii)
{
tagspeed = 25
tagdir = 90 - 90*obj_girl.shotdir
}
if global.poweredup >= 1
{
iii = instance_create(x,y,obj_shot)
with (iii)
{
tagspeed = 25
tagdir = 90 - 100*obj_girl.shotdir
}
iii = instance_create(x,y,obj_shot)
with (iii)
{
tagspeed = 25
tagdir = 90 - 80*obj_girl.shotdir
}
}
shot_yes = 0
alarm[11] = 3
sound_play(snd_shot)
}
}
if keyboard_check_pressed(ord("X"))
{
if global.bombtier >= 100
{
instance_create(x,y,obj_bombpart)
with (obj_enemy)
{
instance_destroy()
}
global.bombtier = 0
tagger = 0
sound_play(snd_bombexplodeA)
sound_play(snd_bombexplodeB)
sound_play(snd_bombexplodeC)
}
else
{
sound_play(snd_bombno)
}
}
image_xscale = shotdir
global.girlinvuln -= 1
if tagx > 460
{
tagx = 460
}
if tagx < 20
{
tagx = 20
}
if tagy > 300
{
tagy = 300
}
if tagy < 20
{
tagy = 20
}
x = tagx + __view_get( e__VW.XView, 0 )
y = tagy + __view_get( e__VW.YView, 0 )