LISTS?! Deleting used selections, randomizing list input

0 favourites
  • 3 posts
From the Asset Store
Selection frame like in RTS games, works both on mobile and desktop devices.
  • Heya!

    I'm very new to this, I literally started developing my game 3 days ago but so far have managed to find tutorials/forums for all the issues I've run into except this one.

    Intention:

    You enter your name into a text box, which then goes into the list, then next layout it chooses a name from the list (it's now that persons turn to play) then when you get back to that layout, I want it to have a different name (either random from the list or in order is fine) and once all the names have been displayed I want it to return to the menu.

    So far:

    I've got the names adding to the list, I have a maximum of 10 names, I can get it to randomly choose a name for the next layout.

    I need:

    Help with the function of deleting names from the list when they've been selected.

    Help with it realizing all names are deleted and then returning to the menu

    Please help me! And because I'm really new please dumb it down for me :)

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yooo man!

    Since i can't post here the capx, i just toke some screenshots.

    What i used was: List, Text and only that to keep things as clean as possible.

    -- Yuri Seiya from Utopic Blades Team --

  • Judging by what you want to do I would do it a bit differently actually.

    You have 2 layouts. The menu & the game.

    You startup with the menu.

    You make a global variable "current_player". By default it is empty.

    On start of layout of the menu you check if the current player is empty OR the list is empty. If so, you just show the menu and allow adding players to the list.

    You've got a button to start off with the first player. When you press it, a person is selected from the list, the current_player variable is set to that value, and you go to the next layout. There you can read the current_player's name from the variable. In the game layout you foresee a possibility to go back to the menu.

    On start of layout of the menu you check if the global variable is empty. If it is not empty, you know the menu is loading because it is coming back from the game layout. So you check if the list is empty. If it is not empty you immediately choose the next player and go to the game layout again after setting the current_player again.

    The last time you load the menu again, the list will be empty, and you just snap into the logic where the game started off to begin with.

    That's my 2 cents.

    If you're completely new to this, maybe you can check my tutorials on my channel, where you can get a good understanding on how you can make some real world example games and how the logic could work.

    youtube.com/channel/UCZ6QjvqEs9dR2miRnfFqIpQ

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