SOLVED show turrets line of sight with a sprite

Get help using Construct 2

Post » Thu Sep 04, 2014 10:05 pm

Hi,

I'm looking to use the turret behaviour, but I would like to show the user how far the turret can see using a sprite (like a light)

so lets say my turrets current range is 100, I would like display this, how would I go about doing that?

Thanks
Last edited by Neller on Thu Sep 04, 2014 10:13 pm, edited 1 time in total.
B
11
S
2
G
1
Posts: 68
Reputation: 777

Post » Thu Sep 04, 2014 10:12 pm

nevermind have sorted it :)

it anybody else was looking for the same thing but wasnt sure how here is how I did it...

1: created a 50% transparent sprite
2: added an even when I click ont he turret to move the transparent sprite to the turrents X & Y location
3: set the transparents sprite width and height to the range of the turret

This creates a 'view type' effect around the turret and shows you how far the turret can see on the map.

Might not be of interest but just in case thought I would share.
B
11
S
2
G
1
Posts: 68
Reputation: 777

Post » Thu Sep 04, 2014 11:36 pm

Could you share a capx?, i wanna see how this worked out, if not it's fine :)
B
22
S
6
Posts: 244
Reputation: 2,700


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 21 guests