gmc-jam-3/objects/obj_bossSprite/Step_0.gml

65 lines
1.3 KiB
Plaintext

if blocks > 0
{
blocks += 1
if blocks > 4
{
blocks = 1
stuff = instance_create(x,y,obj_bullet_boss_particle_big)
with (stuff)
{
speed = 5 + random(2)
direction = random(360)
}
stuff = instance_create(x,y,obj_cherry_parts)
with (stuff)
{
speed = 5 + random(2)
direction = random(360)
}
}
}
if untouchable = 1
global.bossHP = prevhp
prevhp = global.bossHP
if blah = 3
{
instance_create(random(room_width),random(room_height) - 300,obj_cherry);
blah = 0
}
blah += 1
if moving <= 0 and possible = 1
{
movex = x-100+irandom(200)
movey = y-20+irandom(40)
if (instance_exists(obj_player) ) {
if (movex < x and x > obj_player.x) or (movex > x and x < obj_player.x)
{
if movey > 300
{
movey -= 60
}
if movey < 70
{
movey += 60
}
if movex > 954
{
movex -= 300
}
if movex < 70
{
movex += 300
}
moving = 20
move_towards_point(movex,movey,3);
}
}
friction = .05
}
if speed <= 1
{
moving -= 1
}