How do I LoS on sprite which is also obstacle?

Get help using Construct 2

Post » Sat Nov 29, 2014 11:39 pm

I'll try to explain the question the best i can (sorry for the english!)

I have Wolves and Sheeps

Wolf LoS considers Sheep as obstacle, so he won't see behind her.

BUT

Wolf also attacks sheep if she is in LoS, and since she's an obstacle herself, she will never be in LoS.

Is there a way to allow LoS obstacle to be seen by the very same LoS behaviour they're an obstacle to?
B
66
S
22
G
4
Posts: 360
Reputation: 6,584

Post » Sun Nov 30, 2014 12:45 am

I am just replying quick, probably I should not because I haven't tested. But if you made a small sprite behind the sheep, and keep its position updated to reflect the sheep and it is not set to be obstacle?
B
58
S
18
G
13
Posts: 447
Reputation: 10,740

Post » Sun Nov 30, 2014 2:17 am

@helena made a good suggestion. Here it is as a capx:

https://www.dropbox.com/s/tpwhd37i7drq7 ... .capx?dl=0
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Sun Nov 30, 2014 2:51 am

Thanks folks, @tiam you're not a n00b anymore :P
B
66
S
22
G
4
Posts: 360
Reputation: 6,584

Post » Sun Nov 30, 2014 3:02 am

Oh no! What am I going to do with my crown of n00bness? :cry: :lol:
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202


Return to How do I....?

Who is online

Users browsing this forum: Klarner, Yahoo [Bot] and 27 guests