Association and picking problems

0 favourites
  • 4 posts
From the Asset Store
For problem solving, puzzles, bubbles, platforms and other adventures.
  • In my game, Psi, I often have at least a few instances of the same enemy on screen at a time. I use rectangular sprites for my collision detectors and have my spriter animations associated with the sprite by UIDs, etc. The problem I have is in spawning other effects--fire for example. How do you get the right effect associated with the right sprite and animation. For instance, let's say you have box 1. After a certain attack you want to set the target on fire so you spawn fire 1 and now try to apply it to the enemy so it stays with them and in the proper z order etc. What picking method would you use? Pick box where box.number = fire.number doesn't seem to be enough to associate the 2. How do you do it? Thanks.

  • There are 2 ways that I know of. The first one is to use a container. The second one is to use the UID of an object and link it to an other with an instance variable. See the attached example.

    [attachment=0:32c8h6bp][/attachment:32c8h6bp]

    -EDIT- Unless you mean associate within Spriter, in which case I don't know, I haven't used Spriter enough yet, I am wating for v.1 to come out first.

  • eli0s - thanks for sharing this, you have been a great help to me. I was trying to use the pick behavior but all I had to do was set and compare the ID variable. Thanks so much!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That's great!

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