How do I link characters?

0 favourites
  • 4 posts
From the Asset Store
Firebase: Analytics, Dynamic Links, Remote Config, Performance, Crashlytics on Android, iOS & Web Browser
  • Hello there!

    I'm working on my first in-depth project after being out of games coding for years!

    I'm making a top down Gauntlet style game it's based on an old Sega game called Gain Ground.

    When a character's health drops to 0 I'm trying to do the following:

    Change the normal sprite to a 'defeated' sprite (I can do this bit)

    But I'm having a load of characters in the game. So the idea is that you can rescue a downed character, but it needs to remember which character is downed & rescueable.

    Do I have to just manually do this for each player sprite, or can it be grouped somehow?

    So there are character objects - P1, P2, P3 (for example) which need downed objects (D1, D2, D3)

    I'm hoping that makes sense!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I guess you could put them all in a family named "characters" or something and give each individually their "alive" and their "downed" animations with the same names for each.

    Make a group variable that checks if the health is 0, and then say "if Characters family variable is equal to 0, set animation to downed"

    That should work I think :)

  • Assuming the characters are all separate objects you can put them all in a family then give the family a boolean instance variable named "Downed". Set the boolean to "true" when in the save event you set their animation.

    You can pick all of them in an event with "Is boolean set"

  • Thank you both! I'm going to bhave a play around with those ideas this week.

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