Creating A Team by Selecting Unlocked Characters

0 favourites
  • 2 posts
From the Asset Store
Unlock Levels, Worlds & skin plus add coins by watching ads
  • I haven't created an array as of yet using a more recent tutorial, so I'm trying to figure out how to do this without one.

    Basically, I'm trying to create a set of events that would work as follows:

    1) Player goes to 'Team Edit' menu screen

    2) Player has 5 of 12 unlocked characters

    3) Player must fill 4 spots on their team

    4) Player selects 1 member for each spot; can replace any character with another available

    5) Player can empty all spots at once by choosing 'Reset Team'

    I've been working on it but I'm sure someone may have an easier way of setting this up easier than I could. Any help would be appreciated, along with links to any good AND recent array tutorials for me to look over. Thanks in advance.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You don't need an array, you can do this with instance variables.

    Add "isUnlocked" and "isSelected" instance variables to your character sprite/family.

    In "Team Edit" menu display only characters that have isUnlocked=true

    When player clicks a character, toggle isSelected variable.

    To keep track of how many characters are selected, you can use a counter variable, or you can pick all characters with isSelected=true and use expression character.PickedCount to get the number of picked instances.

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