|baby|roach|
01-02-2003, 07:21 PM
Hey
I have this script here called odysseyLOH, it doesnt show up in HudManager.
How could this be fixed so I could move it around?
// odysseyLOH by sal9000
function odysseyLOHconnect() {
//odysseyLOH.position = "617 522";
%posX = getWord(backPackFrame.pos ition, 0);
%posY = getWord(backPackFrame.pos ition, 1);
odysseyLOH.position = %posX @ " "@ (%posY-23);
odysseyLOH.extent = "143 20";
}
package odysseyLOH {
function loadFavorite(%index, %echo) {
parent::loadFavorite(%ind ex, %echo);
$odysseyLastFav = $odysseyCurrentFav;
$odysseyCurrentFav = $pref::FavNames[%index];
//odysseyLOH.position = "617 522";
%posX = getWord(backPackFrame.pos ition, 0);
%posY = getWord(backPackFrame.pos ition, 1);
odysseyLOH.position = %posX @ " "@ (%posY-23);
odysseyLOH.extent = "143 20";
odysseyLOH.pack.SetValue("");
odysseyLOH.text.setValue( $odysseyCurrentFav);
}
function addQuickPackFavorite(%pac k, %item) {
parent::addQuickPackFavor ite(%pack, %item);
//odysseyLOH.position = "617 502";
%posX = getWord(backPackFrame.pos ition, 0);
%posY = getWord(backPackFrame.pos ition, 1);
odysseyLOH.position = %posX @ " "@ (%posY-43);
odysseyLOH.extent = "143 40";
if(%item $= "") %item = "Pack";
if ( $Hud['inventoryScreen'].staticData[1, 1].getValue() $= "" ) {
%CurrentFav = $pref::Favorite[$pref::FavCurrentSelect];
for ( %i = 0; %i < getFieldCount( %CurrentFav ); %i++ ) {
%type = getField( %CurrentFav, %i );
%equipment = getField( %CurrentFav, %i++ );
%invalidPack = checkPackValidity(%pack, %equipment, %item );
if(%invalidPack) {
odysseyLOH.pack.setValue("\c5cannot use pack with loadout");
return;
}
else odysseyLOH.pack.setValue("add on: \c5"@%pack);
}
}
else {
%armor = $Hud['inventoryScreen'].data[0, 1].getValue();
%invalidPack = checkPackValidity(%pack, %armor, %item );
if(%invalidPack) {
odysseyLOH.pack.setValue("\c5cannot use pack with loadout");
return;
}
%favList = $Hud['inventoryScreen'].data[0, 1].type TAB %armor;
for ( %i = 1; %i < $Hud['inventoryScreen'].count; %i++ ) {
%type = $Hud['inventoryScreen'].data[%i, 1].type;
%equipment = $Hud['inventoryScreen'].data[%i, 1].getValue();
if(%type $= %item) %equipment = %pack;
%invalidPack = checkPackValidity(%pack, %equipment, %item );
if(%invalidPack) {
odysseyLOH.pack.setValue("\c5cannot use pack with loadout");
return;
}
else odysseyLOH.pack.setValue("add on: \c5"@%pack);
}
}
}
function ClientCmdDisplayHuds() {
parent::ClientCmdDisplayH uds();
switch$ ($HudMode) {
case "Pilot":
odysseyLOH.setVisible(fal se);
case "Passenger":
odysseyLOH.setVisible(tru e);
case "Object":
odysseyLOH.setVisible($od ysseyLOHState);
case "Observer":
odysseyLOH.setVisible(fal se);
case "PickTeam":
odysseyLOH.setVisible(fal se);
default:
odysseyLOH.setVisible($od ysseyLOHState);
}
}
function DispatchLaunchMode() {
addMessageCallback('msgIT eamChanged', odysseyLOHconnect);
parent::DispatchLaunchMod e();
}
function LoadingGui::onWake(%this) {
if($odysseyLOHgui $= "false") {
//position vars here
odysseyLOHcreate();
$odysseyLOHgui = "true";
}
odysseyLOH.setVisible($od ysseyLOHState);
parent::onWake(%this);
}
function OptionsDlg::applyGraphicC hanges( %this ) {
$odysseyLOHchanged = "true";
parent::applyGraphicChang es( %this );
}
function PlayGui::onWake(%this) {
if($odysseyLOHplayGUI $= "false") {
odysseyLOHconnect();
$odysseyLOHplayGui = "true";
}
parent::onWake(%this);
if($odysseyLOHchanged $= "true") {
odysseyLOHcreate();
$odysseyLOHchanged = "false";
}
}
function odysseyLOHcreate() {
if(!isObject(PlayGui))
return;
if(!isObject($odysseyLOH) ) {
$odysseyLOH = new ShellFieldCtrl(odysseyLOH ) {
profile = "GuiChatBackProfile";
horizSizing = "right";
vertSizing = "top";
position = "617 522";
extent = "143 20";
minExtent = "8 8";
visible = "1";
};
playgui.add($odysseyLOH);
odysseyLOH.text = new GuiTextCtrl() {
profile = "GuiTextObjHudCenterProfil e";
horizSizing = "right";
vertSizing = "bottom";
position = "1 1";
extent = "141 18";
visible = "1";
};
odysseyLOH.add(odysseyLOH .text);
odysseyLOH.pack = new GuiTextCtrl() {
profile = "GuiTextObjHudCenterProfil e";
horizSizing = "right";
vertSizing = "bottom";
position = "1 19";
extent = "141 18";
visible = "1";
};
odysseyLOH.add(odysseyLOH .pack);
}
else {
//odysseyLOH.position = "617 522";
%posX = getWord(backPackFrame.pos ition, 0);
%posY = getWord(backPackFrame.pos ition, 1);
odysseyLOH.position = %posX @ " "@ (%posY-23);
odysseyLOH.extent = "143 20";
}
}
};
$odysseyLOHplayGui = "false";
$odysseyLOHgui = "false";
$odysseyLOHmove = "false";
$odysseyLOHchanged = "false";
$odysseyLOHstate = TRUE;
activatePackage(odysseyLO H);
// atl nfo
$odysseyLOHversion = "1.51 (s)";
$odysseyLOHinfo = "a loadout HUD";
I have this script here called odysseyLOH, it doesnt show up in HudManager.
How could this be fixed so I could move it around?
// odysseyLOH by sal9000
function odysseyLOHconnect() {
//odysseyLOH.position = "617 522";
%posX = getWord(backPackFrame.pos ition, 0);
%posY = getWord(backPackFrame.pos ition, 1);
odysseyLOH.position = %posX @ " "@ (%posY-23);
odysseyLOH.extent = "143 20";
}
package odysseyLOH {
function loadFavorite(%index, %echo) {
parent::loadFavorite(%ind ex, %echo);
$odysseyLastFav = $odysseyCurrentFav;
$odysseyCurrentFav = $pref::FavNames[%index];
//odysseyLOH.position = "617 522";
%posX = getWord(backPackFrame.pos ition, 0);
%posY = getWord(backPackFrame.pos ition, 1);
odysseyLOH.position = %posX @ " "@ (%posY-23);
odysseyLOH.extent = "143 20";
odysseyLOH.pack.SetValue("");
odysseyLOH.text.setValue( $odysseyCurrentFav);
}
function addQuickPackFavorite(%pac k, %item) {
parent::addQuickPackFavor ite(%pack, %item);
//odysseyLOH.position = "617 502";
%posX = getWord(backPackFrame.pos ition, 0);
%posY = getWord(backPackFrame.pos ition, 1);
odysseyLOH.position = %posX @ " "@ (%posY-43);
odysseyLOH.extent = "143 40";
if(%item $= "") %item = "Pack";
if ( $Hud['inventoryScreen'].staticData[1, 1].getValue() $= "" ) {
%CurrentFav = $pref::Favorite[$pref::FavCurrentSelect];
for ( %i = 0; %i < getFieldCount( %CurrentFav ); %i++ ) {
%type = getField( %CurrentFav, %i );
%equipment = getField( %CurrentFav, %i++ );
%invalidPack = checkPackValidity(%pack, %equipment, %item );
if(%invalidPack) {
odysseyLOH.pack.setValue("\c5cannot use pack with loadout");
return;
}
else odysseyLOH.pack.setValue("add on: \c5"@%pack);
}
}
else {
%armor = $Hud['inventoryScreen'].data[0, 1].getValue();
%invalidPack = checkPackValidity(%pack, %armor, %item );
if(%invalidPack) {
odysseyLOH.pack.setValue("\c5cannot use pack with loadout");
return;
}
%favList = $Hud['inventoryScreen'].data[0, 1].type TAB %armor;
for ( %i = 1; %i < $Hud['inventoryScreen'].count; %i++ ) {
%type = $Hud['inventoryScreen'].data[%i, 1].type;
%equipment = $Hud['inventoryScreen'].data[%i, 1].getValue();
if(%type $= %item) %equipment = %pack;
%invalidPack = checkPackValidity(%pack, %equipment, %item );
if(%invalidPack) {
odysseyLOH.pack.setValue("\c5cannot use pack with loadout");
return;
}
else odysseyLOH.pack.setValue("add on: \c5"@%pack);
}
}
}
function ClientCmdDisplayHuds() {
parent::ClientCmdDisplayH uds();
switch$ ($HudMode) {
case "Pilot":
odysseyLOH.setVisible(fal se);
case "Passenger":
odysseyLOH.setVisible(tru e);
case "Object":
odysseyLOH.setVisible($od ysseyLOHState);
case "Observer":
odysseyLOH.setVisible(fal se);
case "PickTeam":
odysseyLOH.setVisible(fal se);
default:
odysseyLOH.setVisible($od ysseyLOHState);
}
}
function DispatchLaunchMode() {
addMessageCallback('msgIT eamChanged', odysseyLOHconnect);
parent::DispatchLaunchMod e();
}
function LoadingGui::onWake(%this) {
if($odysseyLOHgui $= "false") {
//position vars here
odysseyLOHcreate();
$odysseyLOHgui = "true";
}
odysseyLOH.setVisible($od ysseyLOHState);
parent::onWake(%this);
}
function OptionsDlg::applyGraphicC hanges( %this ) {
$odysseyLOHchanged = "true";
parent::applyGraphicChang es( %this );
}
function PlayGui::onWake(%this) {
if($odysseyLOHplayGUI $= "false") {
odysseyLOHconnect();
$odysseyLOHplayGui = "true";
}
parent::onWake(%this);
if($odysseyLOHchanged $= "true") {
odysseyLOHcreate();
$odysseyLOHchanged = "false";
}
}
function odysseyLOHcreate() {
if(!isObject(PlayGui))
return;
if(!isObject($odysseyLOH) ) {
$odysseyLOH = new ShellFieldCtrl(odysseyLOH ) {
profile = "GuiChatBackProfile";
horizSizing = "right";
vertSizing = "top";
position = "617 522";
extent = "143 20";
minExtent = "8 8";
visible = "1";
};
playgui.add($odysseyLOH);
odysseyLOH.text = new GuiTextCtrl() {
profile = "GuiTextObjHudCenterProfil e";
horizSizing = "right";
vertSizing = "bottom";
position = "1 1";
extent = "141 18";
visible = "1";
};
odysseyLOH.add(odysseyLOH .text);
odysseyLOH.pack = new GuiTextCtrl() {
profile = "GuiTextObjHudCenterProfil e";
horizSizing = "right";
vertSizing = "bottom";
position = "1 19";
extent = "141 18";
visible = "1";
};
odysseyLOH.add(odysseyLOH .pack);
}
else {
//odysseyLOH.position = "617 522";
%posX = getWord(backPackFrame.pos ition, 0);
%posY = getWord(backPackFrame.pos ition, 1);
odysseyLOH.position = %posX @ " "@ (%posY-23);
odysseyLOH.extent = "143 20";
}
}
};
$odysseyLOHplayGui = "false";
$odysseyLOHgui = "false";
$odysseyLOHmove = "false";
$odysseyLOHchanged = "false";
$odysseyLOHstate = TRUE;
activatePackage(odysseyLO H);
// atl nfo
$odysseyLOHversion = "1.51 (s)";
$odysseyLOHinfo = "a loadout HUD";