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
CreateEntityAtArea problem
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#2
RE: CreateEntityAtArea problem

Try this:

void OnStart()
{
     SetLocalVarInt("Var01", 0); // # of pots made check
     Func01(); // looping function
}
void Func01()
{
     AddTimer("", 1, "Func02");
}
void Func02(string &in asTimer)
{
     if (GetLocalVarInt("Var01") < 11)
     {
          int x = GetLocalVarInt("Var01");
          x = x + 1;
          SetLocalVarInt("Var01", x); // I'm just using one way, there are many other ways to do it
          PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);
          CreateEntityAtArea("Create", "vase01.ent", "ScriptArea_1", false);
          Func01();
     }
}

I was able to implement rocks to be created at random times at random areas and random rock sizes (out of 2). After the 100th or so rock does it start lagging. xD

(This post was last modified: 08-03-2011, 03:51 AM by Kyle.)
08-03-2011, 03:49 AM
Find


Messages In This Thread
CreateEntityAtArea problem - by Rapture - 08-03-2011, 03:27 AM
RE: CreateEntityAtArea problem - by Kyle - 08-03-2011, 03:49 AM
RE: CreateEntityAtArea problem - by Apjjm - 08-03-2011, 09:25 PM



Users browsing this thread: 1 Guest(s)