Does anyone know about the HUD placement? I'm trying to get the game to recognize 3 partner huds instead of 1.
void main()
{
partnerLife();
}
void partnerLife()
{
if (openborvariant("in_level"))
{
void self = getlocalvar("self");
void type = getentityproperty(self, "type");
void partner = getglobalvar("currentPartner"); //IDENTIFY PARTNER 1
void partner2 = getglobalvar("currentPartner1"); //IDENTIFY PARTNER 2
void partner3 = getglobalvar("currentPartner2"); //IDENTIFY PARTNER 3
if (type == openborconstant("TYPE_NPC"))
{
int xIcon = 81;
int yIcon = 2;
int xName = 96;
int yName = 5;
int xLife = 84;
int yLife = 27;
if (getglobalvar("partnerLifeBar") == "full_hud")
{
// Adjust positions for the second and third partners
if (getglobalvar("currentPartner") != NULL())
{ void partner = getentityproperty(self, "defaultname");
xIcon = 160;
yIcon = 2;
xName = 175;
yName = 5;
xLife = 163;
yLife = 27;
}
if (getglobalvar("currentPartner2") != NULL())
{
xIcon += 239;
yIcon += 2;
xName += 254;
yName += 5;
xLife += 242;
yLife += 27;
}
// Draw partner names
void partnerName = getentityproperty(self, "defaultname");
int font = 1;
drawstring(xName + (strwidth("____" + partnerName, font)), yName, font, "CPU");
}
// Rest of your HUD drawing logic here...
// Set HUD positions
changeentityproperty(self, "iconposition", xIcon, yIcon);
changeentityproperty(self, "nameposition", xName, yName);
changeentityproperty(self, "lifeposition", xLife, yLife);
}
}
}
void main()
{
partnerLife();
}
void partnerLife()
{
if (openborvariant("in_level"))
{
void self = getlocalvar("self");
void type = getentityproperty(self, "type");
void partner = getglobalvar("currentPartner"); //IDENTIFY PARTNER 1
void partner2 = getglobalvar("currentPartner1"); //IDENTIFY PARTNER 2
void partner3 = getglobalvar("currentPartner2"); //IDENTIFY PARTNER 3
if (type == openborconstant("TYPE_NPC"))
{
int xIcon = 81;
int yIcon = 2;
int xName = 96;
int yName = 5;
int xLife = 84;
int yLife = 27;
if (getglobalvar("partnerLifeBar") == "full_hud")
{
// Adjust positions for the second and third partners
if (getglobalvar("currentPartner") != NULL())
{ void partner = getentityproperty(self, "defaultname");
xIcon = 160;
yIcon = 2;
xName = 175;
yName = 5;
xLife = 163;
yLife = 27;
}
if (getglobalvar("currentPartner2") != NULL())
{
xIcon += 239;
yIcon += 2;
xName += 254;
yName += 5;
xLife += 242;
yLife += 27;
}
// Draw partner names
void partnerName = getentityproperty(self, "defaultname");
int font = 1;
drawstring(xName + (strwidth("____" + partnerName, font)), yName, font, "CPU");
}
// Rest of your HUD drawing logic here...
// Set HUD positions
changeentityproperty(self, "iconposition", xIcon, yIcon);
changeentityproperty(self, "nameposition", xName, yName);
changeentityproperty(self, "lifeposition", xLife, yLife);
}
}
}