Information about object: obj_tank
Sprite: tank
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent: obj_zombie_parent
Mask: <same as sprite>
Create Event:
start moving in directions 000100000 with speed set to 0.15
execute code:
shealth=250 only = false alarm[0]=200 //in the mouse left press event use this code do move_random(489,69) until self.x <800 and self.y >34 and self.y <320 and self.x >200 //in the step event use this code
Alarm Event for alarm 0:
execute code:
instance_create(x,y,obj_tshot) alarm[0]=200
Step Event:
execute code:
if shealth <= 0
{
instance_destroy()
global.cash+=500
}
Collision Event with object obj_shot:
execute code:
// Destroy itself, then add 1 Exp, and add 5 money. shealth -= 2for other object: destroy the instance
Collision Event with object obj_tower_parent:
for other object: destroy the instance
Collision Event with object obj_mower:
set variable shealth relative to -150
for other object: destroy the instance
Collision Event with object obj_explode:
set variable shealth relative to -100
Collision Event with object obj_uvshot:
execute code:
// Destroy itself, then add 1 Exp, and add 5 money. shealth -= ((global.money * 4) / 1000)
for other object: destroy the instance
Collision Event with object obj_smexplode:
set variable shealth relative to -100
Draw Event:
execute code:
draw_sprite_ext(tank,0,x,y,1,1,image_angle,self,1) draw_healthbar(x+30,y+118,x+120,y+128,((shealth/250)*100),c_black,c_red,c_lime,0,true,true)











