You need these objects: a button, a projectile, a tower and a marker (uses same sprite as tower.)
I really can't teach you how to do the upgrade system if you can't do code. Tell me if you can.
Button:
Create event:
Set variable Hover to 0.
Begin step event:
Set variable Hover to 0.
Mouse event no button:
Set variable Hover to 1.
Left pressed:
Create instance of object marker at position(mouse_x,mouse_y)
Draw event:
Draw sprite at relative position(0,0)
if variable Hover is equal to 1
{Start of block
Set color. (Your decision)
at position room_width/2 draw text "Whatever you want to say"
}End of blockMarker:
Step event:
Jump to given position(mouse_x,mouse_y)
if score(what I use for money) is greater than 249 (if the prize of the tower is 250)
{Start of block
Set variable score relative to -250
Change instance to object tower.
}End of block
else
{Start of block
destroy instance self
}End of blockDraw event:
Draw sprite spr_Tower at relative position (0,0) (if your sprite is centered)
Draw circle with relative vertices (-34,-34) and (66,66), outline.
Tower object:
Create event:
Set variable Showrange to 0.
Set variable Deactivated to 0.
Set variable Menuvar to 0.
Set variable Strikeshot to 0.
Set variable ProjectileID to 0.
Destroy event:
Set score relative to 250.
Step event:
If the number of enemies is greater than 0
{Start of block
With chance 1 out of 3 perform the next action(s)
{Start of block
Create instance of object projectile at relative position (0,0)
}
}Collision road:
destroy instance self
Intersect boundary and outside room:
Destroy instance self
Draw event:
Draw sprite tower at relative position (0,0)
Draw circle with relative vertices(-50,-50) and (50,50)
Projectile object:
Create event:
Check expression: distance_to_object(Target)<50
{
Move towards point (Enemy.x,Enemy.y) at speed 15
}Step event:
Check expression: distance_to_object(Tower)>50
{
destroy instance self
}
Collision Enemy:
[code]destroy instance selfI'll post the creepspawn-system tomorrow. I'm not sure if I can explain it. :/