How I can create a player instance?

I think when you use a player as a key ina map, internally the engine is doing some magic and I’m guessing it hashes the player struct/object as a unique identifier and stores it as a reference? Cause it won’t store the whole player as a key I wouldn’t have thought (any staff confirmations/explanations on this would be good knowledge while I’m learning by the way).

Which means Key is that unique identifier, not the player, so you might be able to do something like for (Key -> Value: PlayerMap, Player := player[Key]), which will give you a Player variable.

This probably won’t work though as the player[Key] is for checking if an Agent is a Player usually, but it might be able to do the same with the unique identifier key too, worth a try at least as internally it might be able to map the references/unique identifiers the same way.

You could also try just passing the Key to the Activate method on EndDevice like so: EndDevice.Active(Key), I’m pretty confident that won’t work either but worth just marking it off the list of possibilities to help find the answer.