Topic: Simple Individual Special Moves List

This has been answered before, but I´m looking for a simpler solution, as I´m not an experienced coder.

The pause menu should display an individual special moves list on the left for player 1 and on the right for player 2.

To achieve this, I´ve created GUI prefabs for theese lists, now I need them to be activated/deactivated according to the players name.

Something like: if player1 name is x activate GUI Element

I assume this is really easy for a good coder, so some tips would be greatly appreciated! smile

Share

Thumbs up Thumbs down

Re: Simple Individual Special Moves List

Off the top of my head here so I can't guarantee anything. There's obviously a few ways you can go about this.

You can do as you say, do an if check for the player name and then render the UI elements for that character. Personally, I would suggest a switch statement over an if/else as it will be more clear and you won't waste processing time. Very minor processing time, but it always helps.

Share

Thumbs up +1 Thumbs down

Re: Simple Individual Special Moves List

Thank you MrPonton smile

The switch method is probably a bit more elegant, so I will try it this way.

Share

Thumbs up Thumbs down