Author Topic: A string that only returns the full name under certain circumstances?  (Read 1707 times)

I'm trying to make an object with two 'names', I need a string that does this;


$a = "Bleh$blah$";

echo($a); >> "Bleh"

echo(SecretWord($a)); >> "Blehblah"


I'm working with an object with a null name, and in order to target it for this function, it cannot be null.

This is a default object that already has many functions that search for the null object, so giving it a name is not an option, I need to give it a name that only shows up under a certain function.
« Last Edit: March 21, 2013, 12:22:44 PM by Conservative »

That isn't possible. What is the context? There may be other solutions.

That isn't possible. What is the context? There may be other solutions.
Well, I was hoping to keep it under wraps, but I guess I have to.

When Badspot set the avatar object in the Avatar_Preview GUI, he did not name it, and he had every function after that search for the null object.

Had he named it, I could apply a hat object to it; and proceed with the rest of my add-on.

Replacing the object with a named object turns up errors since all the functions search for a null object.

Strangely enough; unlike the rest of the functions that search for the null object,

Code: [Select]
ObjectView.mountObject(name, model, skin, parentName, nodeName, lod)

This code does not work if it does not have a name, and in-fact CRASHES the game.

Avatar_Preview.mountObject("ROCKETL","Add-Ons/Weapon_Rocket_Launcher/rocketlauncher.dts","","","head",100);

I have tested this on the named object as well, and it works flawlessly.

Replacing the object with a named object turns up errors since all the functions search for a null object.

Remove the name after you're done with it?

%obj.setName( "" );

Remove the name after you're done with it?

%obj.setName( "" );
The avatar ITSELF does not have a setName, the only option I have is to setObject(name,), which refreshes the whole thing.

The avatar is not listed under any variable or even shows up as an object in the Avatar_Preview.
« Last Edit: March 21, 2013, 12:44:06 PM by Conservative »


Any place where you are able to insert the name of an object in a function as a parameter outisde a string context, you can alternatively input the ID of the object.

Im having trouble following your issue, so if I'm completely off subject here, then ignore silly old nexus.

Any place where you are able to insert the name of an object in a function as a parameter outisde a string context, you can alternatively input the ID of the object.

Im having trouble following your issue, so if I'm completely off subject here, then ignore silly old nexus.
Well it isn't stored anywhere I am able to visually locate, I've searched tree(), and the GUI editor multiple times.

Well you can't just create a string with two words jumbled together, and then print it out and expect it to print the first word out.
Classes maybe..?

I still don't understand what you're trying to do here..

He wants to mount a model to the player model in the appearance GUI.

Doing so crashes the game unless he gives the object a name.
But if he gives it a name, none of the default functionality works.