The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Why is this not functioning correctly?
Pshyched Offline
Member

Posts: 130
Threads: 21
Joined: Nov 2012
Reputation: 5
#1
Why is this not functioning correctly?

Okay, I am trying something new in the editor, and I am wonder why this is not working..

PHP Code: (Select All)
    void ReplaceOrb(string &in AsParentstring &in AsChildint &in AlState)
    {
        
AddTimer("Wait"0.5"ReplaceOrbTimer");
        
AddTimer("Replace"1.0"ReplaceOrbTimer");
    }
    
void ReplaceOrbTimer(string &in asTimer)
    {
        
string x asTimer;
        if (
== "Wait")
        {
            
SetEntityActive("RealmOrb"false);
            
SetMessage("Messages""DropOrb"0);
        }
        if (
== "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?
06-30-2013, 09:38 AM
Find


Messages In This Thread
Why is this not functioning correctly? - by Pshyched - 06-30-2013, 09:38 AM



Users browsing this thread: 2 Guest(s)