Arch
Legions Developer
I need a bit of help. I'm attempting to add the BG image behind the text of the script. I currently have this:
It seems to hide the whole script as well as conflict with the FlagHud script and wipes out the text of that script; leaving just the BG of FlagHud script. What am I doing wrong? I have a bit of knowledge of scripting by just looking over them and interpreting the code but I have no clue why this is doing this.
Code:
function HudOverlay::AddHudElements(%this)
{
parent::AddHudElements(%this);
%index = %this.AddHudElement();
%this.setHudElementTexture(%index, "mods/autoexec/TrackTor/tracktor");
%this.setHudElementPosition(%index, 200, 300);
%this.setHudElementPositionAnchor(%index, "Left", "VCenter");
%this.setHudElementParent(%index, $HudElement::BaseContainer);
%this.setHudElementRenderWhenDead(%index, true);
$HudOverlay::TrackTorBackground = %index;
parent::AddHudElements(%this);
%index = %this.AddHudElement();
%this.setHudElementPosition(%index, 10, 10);
%this.setHudElementParent(%index, $HudElement::BaseContainer);
%this.setHudElementPositionAnchor(%index, "Left", "Top");
%this.setHudElementRenderWhenDead(%index, true);
$HudOverlay::TrackTor = %index;
}
};
activatepackage(TrackTor);
It seems to hide the whole script as well as conflict with the FlagHud script and wipes out the text of that script; leaving just the BG of FlagHud script. What am I doing wrong? I have a bit of knowledge of scripting by just looking over them and interpreting the code but I have no clue why this is doing this.