mob/verb
TestHUD()
createHUD()
mob/proc
createHUD() for(var/BodyPart/A in src)
HudGroups += list("HudGroup_row1" = new/HudObject(client=src.client)) //This should be based on each limb, and not a single .dmi
var/HudObject/hudrow_1 = HudGroups["HudGroup_row1"]
hudrow_1.addObject(new/HudObject(hudrow_1, client=A,icon_state="Left Arm Healthy", screen_loc="1,1"))
//Using a test .dmi with all body parts in it, these should all reference the icons for each players bodyparts objs
hudrow_1.addObject(new/HudObject(hudrow_1, client=A,icon_state="Left Leg Healthy", screen_loc="1,1"))
hudrow_1.addObject(new/HudObject(hudrow_1, client=A,icon_state="Torso Healthy", screen_loc="1,1"))
hudrow_1.addObject(new/HudObject(hudrow_1, client=A,icon_state="Right Arm Healthy", screen_loc="1,1"))
hudrow_1.addObject(new/HudObject(hudrow_1, client=A,icon_state="Right Leg Healthy", screen_loc="1,1"))
hudrow_1.addObject(new/HudObject(hudrow_1, client=A,icon_state="Head Healthy", screen_loc="1,1"))
hudrow_1.addObject(new/HudObject(hudrow_1, client=A,icon_state="Throat Healthy", screen_loc="1,1"))
hudrow_1.addObject(new/HudObject(hudrow_1, client=A,icon_state="Eyes Healthy", screen_loc="1,1"))
hudrow_1.addObject(new/HudObject(hudrow_1, client=A,icon_state="Reproduction Healthy", screen_loc="1,1"))
hudrow_1.addObject(new/HudObject(hudrow_1, client=A,icon_state="Ears Healthy", screen_loc="1,1"))
hudrow_1.addObject(new/HudObject(hudrow_1, client=A,icon_state="Mouth Healthy", screen_loc="1,1"))
hudrow_1.renderObjects()
// hudrow_2.renderObjects()
Problem description:
So, I have the top, calling in the var/BodyPart/A in src in order to get all of the src's body parts to be able to be called.
I currently have the HUDObjects with temp icon states that was to prove design concept, but now I need to change it over to call the icon & icon state of each body type.
The bodyparts are named as such:
/BodyPart/Head
/BodyPart/Chest
/BodyPart/Eyes
/BodyPart/Ears
/BodyPart/Left_Arm
/BodyPart/Right_Arm
/BodyPart/Reproduction
/BodyPart/Left_Leg
/BodyPart/Right_Leg
Any help would be greatly appreciated
I don't think I'm following and your code is a bit confusing (it seems extra; over-complicated).