06-30-2013, 09:38 AM
Okay, I am trying something new in the editor, and I am wonder why this is not working..
Everything runs smoothly in game, but as it creates another entity under the name of "RealmOrb" i think its creating it as "RealmOrb_1" so the rest of the scripting remains useless. Is there a way to make it not change its name? As you can see, I made a wait timer so it would try not too, But ofcourse, It wont work because Im only making the Previous Entity Inactive. I don't think there is a RemoveEntity script function within the game. Unless I am mistaken?
PHP Code:
void ReplaceOrb(string &in AsParent, string &in AsChild, int &in AlState)
{
AddTimer("Wait", 0.5, "ReplaceOrbTimer");
AddTimer("Replace", 1.0, "ReplaceOrbTimer");
}
void ReplaceOrbTimer(string &in asTimer)
{
string x = asTimer;
if (x == "Wait")
{
SetEntityActive("RealmOrb", false);
SetMessage("Messages", "DropOrb", 0);
}
if (x == "Replace")
{
CreateEntityAtArea("RealmOrb", "orb_grab.ent", "ScriptArea_1", true);
}
}
Everything runs smoothly in game, but as it creates another entity under the name of "RealmOrb" i think its creating it as "RealmOrb_1" so the rest of the scripting remains useless. Is there a way to make it not change its name? As you can see, I made a wait timer so it would try not too, But ofcourse, It wont work because Im only making the Previous Entity Inactive. I don't think there is a RemoveEntity script function within the game. Unless I am mistaken?