I recently downloaded Construct v0.99.
this is what i did to draw range
(Mouse) = sprite
(Towers) = family
('Active') = private variable
(Canvas) = canvas
<font color=green>
1.(Mouse) overlapped (Towers)
(Towers) Value ('Active') Equal to 1
- System: Start Loop "DrawRangeHover" 360 times
-(Canvas) : clear to transparent
2.Else
-(Canvas) : clear to transparent
</font>
then this i put to canvas event on action
<font color=green>
On loop ("DrawRangeHover")
(Mouse) overlap (Towers)
-X1:Towers.X+cos(LoopIndex("DrawRangeHover"))*Towers[Turret>.Range
-X2:Towers.Y+sin(LoopIndex("DrawRangeHover"))*Towers[Turret>.Range
-X3:Towers.X+cos(LoopIndex("DrawRangeHover")+1)*Towers[Turret>.Range
-X4:Towers.Y+sin(LoopIndex("DrawRangeHover")+1)*Towers[Turret>.Range
Then i did "DrawRangeHover"
I made another range just to check if mouse is over towers, then it shows its range
17. Is global variable 'Mode' Equal to 1
Towers: Value 'Active' equal to 1
-System: Start Loop "DrawRangePick" 360 Times
then this i put to canvas event on action
On Loop "DrawRangePick"
Tower Value 'Active = 0'
-X1: TowerBuilder.X+cos(LoopIndex("DrawRangePick"))*Towers[Turret>.Range
-Y1: TowerBuilder.Y+sin(LoopIndex("DrawRangePick"))*Towers[Turret>.Range
-X2: TowerBuilder.X+cos(LoopIndex("DrawRangePick")+1)*Towers[Turret>.Range
-Y2: TowerBuilder.Y+sin(LoopIndex("DrawRangePick")+1)*Towers[Turret>.Range
After I put this, when i run the game. When i builted a tower, it didn't work. When my tower was builted already and my mouse hovers it, it shows range. When the tower isn't build yer and i clicked one from the icons, it doesn't draw the range and left it blank.
Anyone help me, thanks.