How do I pin slave sprites to a master "instances"

  • Hi!

    I could use your help.

    Issue details:

    A. Multiple instances.

    B. Trying to create 1 master instance.

    C. Trying to connect slaves instances to master. (for orbiting purpose)

    D. All are instances of the same sprite.

    Result would be: All slaves rotate the master instance.

    This is a total mindblow for me.

    Do u have the insight i need?

    Kind regards.

    Savvy001

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When an instance is pinned it's not moving at all. Try this:

    Give the instances a variable, e.g. "flag".

    Set "flag" for master to "master" and for "slaves" to slaves.

    Now pin all slaves to another sprite (i always call this sprite "PinHelper", cause I had this problem before).

    Now let PinHelper rotate.

  • Can you use the pin behavior and spawn those slave objects on interval (until set amount) on an image point that is set outside the master instance? No idea on how to achieve the rotation... Sine maybe? Combined with bullet?

  • Custom variables and variable comparison to create an SOL.

    Craete a Family with your Sprite.

    Add variable to Family called master, set the default to 0.

    set your Family var master to 1 for the sprite that is the master.

    then

    compare Family.master =1

    Pint Sprite to Family

    and there you go. easy peasy

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