How do i subtract from an especific instance variable?

0 favourites
  • 7 posts
From the Asset Store
Color Variable
$4.50 USD
10% off
Easily store, modify, read and manipulate colors with Color Variables!
  • I want to create a "respawn" object. It will be able to spawn monsters and once those are destroyed it will spawn more.

    Well, this part I managed to create, but it only works with a single instance. Once i try to add more "respawns" all of them work together.

    Once i kill all the monsters in one respawn, all other respawns create more monsters as well.

    How can i identify the respawn that created an especific monster so i can subtract from it?

    Tagged:

  • You need to pick the right spawner instance inside the function. Add another function parameter - SpawnerUID. Pass Respawn.UID when calling the function. Inside the function use "Respawn Pick by unique ID" condition.

    Or you can set "Copy picked" in function properties, then they should inherit the picked scope.

  • Thanksdop2000, but still didin't work. The monsters are spawning from the other respawns at the same time.

    Tested both ways suggested

  • You probably need to do the same with the Random function - pick Respawn instance by UID.

    I don't really understand why you need those functions. You can spawn new monster directly in event #1

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You probably need to do the same with the Random function - pick Respawn instance by UID.

    I don't really understand why you need those functions. You can spawn new monster directly in event #1

    Sadly it didin't work.

    Added the UID on the random function but it didint work either.

    Tested removing the functions and doing everithing on the same event (you can see it on event #2), but still, the monsters are spawning from other respawns.

    Not sure if it will help, but here is the project:

    dropbox.com/scl/fi/wfzpqltdk8opgmv9n69l9/V6.c3p

  • There were a few mistakes in the code, here is the fixed version

    dropbox.com/scl/fi/prmccc8ug38lfr1ryjl26/V6_.c3p

  • There were a few mistakes in the code, here is the fixed version

    https://www.dropbox.com/scl/fi/prmccc8ug38lfr1ryjl26/V6_.c3p?rlkey=2dgxnlad4gmsj4ogsmpjc00hf&dl=0

    Thank you!!!

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