Visible Line of Sight?

Get help using Construct 2

Post » Mon Jul 27, 2015 8:35 pm

Hey Community,

Is it possible to create a object with the Line of Sight behavior and make the vision of the object visible?

Regards
B
9
S
1
Posts: 50
Reputation: 646

Post » Mon Jul 27, 2015 11:04 pm

make the vision of the object visible? care to elaborate? :)
B
9
S
3
Posts: 32
Reputation: 708

Post » Tue Jul 28, 2015 12:07 am

Is it possible to do that? I didn't saw this option.
B
9
S
1
Posts: 50
Reputation: 646

Post » Tue Jul 28, 2015 5:47 pm

Try to create a sprite with opacity 50, with pin beheavior, pin to the object, and set the width to Object.LineOfSight.Range. If it works, you could adjust the sprite to what you expect. For covering all the range and the degrees of the object LOS, you can create a circle sprite, set the width and height to object lineofsight.range and pin this to the origin of the object that you want to see the lineofsight. 'm away from my computer now, so i dont have how to check this, hope this help you.
B
5
S
1
Posts: 4
Reputation: 283

Post » Tue Jul 28, 2015 6:11 pm

try using a cone-shaped sprite, instead of LOS behavior
"If you want to move a mountain tomorrow, you should start by lifting stones today."
B
62
S
14
G
2
Posts: 286
Reputation: 6,576

Post » Tue Jul 28, 2015 7:03 pm

Here is a veeery simple capx that a made above what i told...

https://drive.google.com/file/d/0BwxSAR ... sp=sharing

:D
B
5
S
1
Posts: 4
Reputation: 283

Post » Tue Jul 28, 2015 7:30 pm

Yes like this, but it doesn't work exactly like the Line of Sight behavior.
When there is a Wall, it should not go over it.

Image
B
9
S
1
Posts: 50
Reputation: 646

Post » Tue Jul 28, 2015 8:33 pm

Make the wall zindex greater than the LOS sprite
B
5
S
1
Posts: 4
Reputation: 283

Post » Tue Jul 28, 2015 8:48 pm

Can you link me a example .capx? I don't really know what you mean.
B
9
S
1
Posts: 50
Reputation: 646

Post » Tue Jul 28, 2015 11:43 pm

In the layout viewer, right click on it, go to z-index option, send to bottom of layer.

https://drive.google.com/file/d/0BwxSAR ... sp=sharing

If you want it to a top shooter, like your example, when you add some room with walls, create a new sprite to be the floor, then, a new one to be the walls. If the player_los have a lesser z-index, it will stay above the new room sprite. Got it?

You can make this with the following layer order:
3 - rooms walls
2 - rooms floors
1 - player and player_los
0 - background

Sorry about my bad english, im brazilian :D
B
5
S
1
Posts: 4
Reputation: 283

Next

Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, DuqueKarl, Vinterstille and 2 guests