How do I make a sprite pick a different version of itself?

Not favoritedFavorited Favorited 0 favourites
  • 3 posts
From the Asset Store
This is the new version of Basketball Practice with animated Character made with C3 Version.
  • Bit confusing of a title but i'll explain...

    Basically I've got an Oil derrick and a radius around it, both as sprites that are in the same container.

    atm, 10 derricks will be spawned into a random position on my map. if they're outside the "world map", they they'll get teleported again until they're within it.

    If the radius of the derrick is touching another radius then it should TP again, however it's not working atm...

    I can't figure out how to get the radius to register another radius, since even though i've got it as (Oil-radius "when overlapping Oil-radius" TP derrick) it's still not teleporting. I believe it's triggering on itself so it's automatically not going through with the commands.

    TLDR: i've got 2 of the exact same sprites that when touching, should teleport around until they aren't touching. I can't figure out how to get that working atm and i'm looking for help.

  • You can create a family containing just the sprite you want to check (in your case, oil-radius) and check if the sprite is overlapping with the family.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's usually done with a family. Add the sprite to a family, move all behaviors and instance variables to the family level. Then you will be able to pick two instances and refer to them separately, for example:

    OilDerrick has LineOfSight to OilDerrickFamily
    OilDerrickFamily pick nearest to (OilDerrick.x, OilDerrick.y)
    

    Or simply:

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