Is it possible to attach a variable to an player itself? (Verse)

Hi @LyssaSugarNya , do you have a specific example in mind? You can create a map where the player is the key and you specify what value you want associated with the player.

For example:

player_info := class:
    # Data to associate with player goes here
    var MyData:float = 0.0

my_device := class(creative_device):
    # Map between player type and player_info class created above.
    var PlayerInfoMap:[player]player_info = map{}

You can learn more about map at Map

5 Likes