Doctor, Who can help me see ?

0 favourites
  • 6 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • not too sure about the title - amused me when I thought of it but now I'm not too sure...

    Been playing around with line of sight and trying (unsuccessfully) to get multiple instances of the same sprite to be able to see if they can see the other copies of themselves, see ?

    I've come up with one way which works but I've done it by pinning a line of sight sprite (eyes) to each of my copies and using these "eyes" to see the other copies. What I wanted to do was use the "line of site" behaviour directly on my copies.

    This is all RapidTom s fault - he started me off with his question

    Here's hoping that someone can come up with a more elegant solution

    <img src="smileys/smiley9.gif" border="0" align="middle"> almost forgot the capx <img src="smileys/smiley9.gif" border="0" align="middle">

    and a screen grab.

    <img src="" border="0">

  • Could you use families for this?

    so put the spplayerpiece in a family called spfamily.

    and check for each spplayerpiece if they have line of sight to the family.

    I know it works in other cases to compare instances with eachother, maybe it will work here too.

  • I did this a while ago for someone asking a similar question, i've modified it to be more relevant here. hope it helps..

    it uses the family method of picking separate instances of the same object at once

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thankyou for your replies.

    LittleStain - your push sent me in the right direction - and I managed to get there !

    keepee - you went about it a different way I think (sorry I've not had a proper look at your capx yet but first glace says differently (and probably better)

    Thanks again

    edit -


    edit 2 - Updated the Capx with correct (possibly not politically correct) comments.

  • it's basically the same actually, mine only adds a few things that you probably don't need

    it counts the amount of body's it sees, and it excludes 'allies' on the same team. (the enemy count is shown with the animation frame, and the teams are done with the coloured animations themselves)

  • yes, of course, you are correct.

    I like the use of colours/shades. A good idea - prepare to be plagiarised ! <img src="smileys/smiley1.gif" border="0" align="middle" />

    Thanks again.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)