Making an accurate range object for a turret object.

Get help using Construct 2

Post » Fri Jul 29, 2016 11:44 pm

When making a simple tower defense game I've come across this seemingly simple issue. I want to make it so when the mouse is hovering over a tower, an object will popup over the tower that is suppose to represent the towers range. This sounds very simple to do, just make the range sprite the same size as the range. But that isn't a proper calculation for the range as I've learned. What would be a simple way to make a proper range sprite for a turret?
Oh, okay.
B
23
S
5
Posts: 40
Reputation: 1,253

Post » Sat Jul 30, 2016 12:37 am

Assuming your range indicator is a circle with diameter the same width of the sprite... your range, or distance from the tower to the edge of the circle, would be the radius of the circle - half the diameter. So set the width and height of the range indicator to 2*range and center it on your tower.
Mistakes were made.
B
52
S
26
G
109
Posts: 1,616
Reputation: 61,653

Post » Sat Jul 30, 2016 8:23 pm

@oosyrag I figured out to do: Turret Range*1.8 = X, X = Range Object size. Thanks anyways.
Oh, okay.
B
23
S
5
Posts: 40
Reputation: 1,253


Return to How do I....?

Who is online

Users browsing this forum: zenox98 and 35 guests