drawing the towers range not working?

This forum is currently in read-only mode.
From the Asset Store
Stacking tower is a game to try to make the tower higher
  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I might be missing something, but is there a reason you can't just draw a circle at the tower, with it's size set to the tower's range, set to be visible upon mousing over the tower in order to display the range?

  • well, when i builted a new tower, the circle is not drawn. after the tower was placed it draws a circle

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)