I mean, I have a turret to shoot things at(with line of sight). And now I want to display the vector/ cone of view that will expand by variables like range or radius coverage. Is it doable in Construct? I knew that I need a sprite for that.
Displaying a cone range can be done by simply resizing a cone sprite. Changing the angle is a little trickier, but I would just create a bunch of animation frames with as many different fan angles as I need.
If you need to show the cone of view WITH line of sight and obstructions... that is a rather advanced topic/technique. If this (https://twitter.com/JoeGribbs/status/701924446429437952) is what you're looking for, I'll leave you with a few links:
https://www.scirra.com/tutorials/902/li ... raycasting
You may want to compromise and just simply show the range and angle with a translucent cone sprite, and let the game handle LOS... showing LOS can be very tricky.
Alternatively, you might want to look into the shadow light/caster behavior, which may give you the effect you're looking for. https://www.scirra.com/manual/178/shadow-light
You may also want to take a look at THIS work-in-progress plugin by Johncw87
Develop games in your browser. Powerful, performant & highly capable.
Thank you very much for your replies.
Yes, I combine turret and LOS. The built-in LOS and turret behavior are great. But where the cone / LOS starts from (from image points?), I mean, if I want to overlay the LOS cone with sprite, how does the radius expansion work? .I tried to make my own sprite ("movieclip") of LOS ,but the result is not good enough.
Anyway ,thanks for your replies.
https://www.dropbox.com/s/5z7tijn3v3t47 ... .capx?dl=0