How do I make variables?

0 favourites
  • 3 posts
From the Asset Store
Color Variable
$4.50 USD
10% off
Easily store, modify, read and manipulate colors with Color Variables!
  • i want my game to have tens of characters to select. first of all how can i set the character i selected (with its respective controls) to the level im playing?

    i did some research and i found global variables the best way to do it. but having tens of characters makes me wonder, is it better to have 1 global variable with tens of number values (each value is a character)? or tens of global variables with 2 values (0/1)?

    i found another way too which consisted in animations but didnt get it right.

    Also please tell me how to do it cause im having a hard time trying to. is there a tutorial somewhere?

    thanks

  • Generally speaking, I would recommend using a single variable to represent a single property/idea, rather than using an individual boolean variable for each possible value.

    So each of your characters has a unique number associated with it. Save that number to your "SelectedCharacter" variable, and use that number for your event conditions.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Generally speaking, I would recommend using a single variable to represent a single property/idea, rather than using an individual boolean variable for each possible value.

    So each of your characters has a unique number associated with it. Save that number to your "SelectedCharacter" variable, and use that number for your event conditions.

    in conclusion: one single global variable with tens of values, each value is a character...

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