Blockland Forums > Modification Help
How does ObjectView.mountObject() work?
Munkey:
Could someone help me figure out how ObjectView.mountObject() work?
This is for a avatar preview in a GUI, I am trying to mount a hat on that Avatar.
From a avatar_preview.dump(); it gave me: ObjectView.mountObject(name,model,skin,parentName,nodeName,lod)
What is each one?
Whatever I try to put in there has given me
--- Code: ---Error: Unable to load:
--- End code ---
Thanks
Slicks555:
--- Code: ---new GuiObjectView(avatarPreview);
function loadAvatar()
{
avatarPreview.forceFOV = 18;
avatarPreview.setOrbitDist(6);
avatarPreview.lightDirection = "0 0.2 0.2";
avatarPreview.setObject("","base/data/shapes/player/m.dts","",100);
avatarPreview.unHideNode("","scoutHat");
avatarPreview.setNodeColor("","scoutHat","1 0 0 1");
avatarPreview.setIFLFrame("", "face", "Add-Ons/Face_Default/memeDesu.png");
avatarPreview.setIFLFrame("", "decal", "Add-Ons/Decal_Default/Space-New.png");
}
--- End code ---
That should pretty much explain how to use those to you.
Port:
--- Quote from: Slicks555 on June 14, 2012, 12:13:35 AM ---
--- Code: ---new GuiObjectView(avatarPreview);
function loadAvatar()
{
avatarPreview.forceFOV = 18;
avatarPreview.setOrbitDist(6);
avatarPreview.lightDirection = "0 0.2 0.2";
avatarPreview.setObject("","base/data/shapes/player/m.dts","",100);
avatarPreview.unHideNode("","scoutHat");
avatarPreview.setNodeColor("","scoutHat","1 0 0 1");
avatarPreview.setIFLFrame("", "face", "Add-Ons/Face_Default/memeDesu.png");
avatarPreview.setIFLFrame("", "decal", "Add-Ons/Decal_Default/Space-New.png");
}
--- End code ---
That should pretty much explain how to use those to you.
--- End quote ---
I don't see you describing mountObject anywhere.
Goldeen:
--- Quote from: Port on June 14, 2012, 02:01:52 AM ---I don't see you describing mountObject anywhere.
--- End quote ---
Most helpful reply 2012.
Chrono:
--- Quote from: Port on June 14, 2012, 02:01:52 AM ---I don't see you describing mountObject anywhere.
--- End quote ---
Okay he didn't spoonfeed, but he gave an indirect solution. I have never worked with GuiObjectViews, and going solely from the OP and Slick's post:
ObjectView.mountObject("hat","file for hat","","","headSkin",100)
Because:
"hat" is just a name of the object
"file for hat" is something you have to fill in, it's the filepath to your hat.
the first "" is unneeded because retail uses node coloring.
the second "" is the player object's name
"headskin" was unclear to me, but I'm certain it's the node you're mounting to.
"100" is the level of detail.