client
var/list/upcomingturns = new/list()
proc/DRAWTURNHUD(var/list/UT)
if(!UT)
return
upcomingturns = UT.Copy()
var/obj/TurnHUD/first = upcomingturns [1]
first.screen_loc = "CENTER+18,CENTER+12"
first.maptext = first.name
first.maptext_width = 64
first.maptext_height = 32
first.maptext_x = 32
first.maptext_y = 25
var/obj/second = upcomingturns [2]
second.screen_loc = "CENTER+18,CENTER+9"
second.maptext = second.name
second.maptext_width = 64
second.maptext_height = 32
second.maptext_x = 32
second.maptext_y = 25
Problem description:So I'm trying to show, within a HUD element the mobs in the upcoming turns. My initial thought was to equate an object variable to the item in each index of the list. However, in doing so, if I edit the maptext of the obj, it also edits the maptext of the mob. Any suggestions for better way of going about this?
BUT you shouldn't need separate objects to represent the mobs that you want to add to your screen, you can just add the mobs themselves (close to the way you're currently doing it) and remove the maptext after a certain amount of time (when the round starts).
And you can set the rest of the maptext variables in the default mob vars, since they appear to be all the same in your case.