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
Patrol Nodes don't work on spawned enemy
Putmalk Offline
Senior Member

Posts: 290
Threads: 13
Joined: Apr 2012
Reputation: 15
#7
RE: Patrol Nodes don't work on spawned enemy

How does this work? Is it like waves and stuff? Or one continuous wave that gets increasingly harder and harder.

If it's by wave, then you do some tricky stuff. First, you can have a start area that after every round, the player fades to black, teleports to the start area, and then you can reset the positions of monsters (ResetProp MAY work for this, else you can just set them to path to the starting area). During this "intermission" when the monsters reset their places, you can randomly activate items that the player can pick up in his starting area, with different positions each time (might I suggest RandInt for this).

What I mean by that is like, presuming you have 100 "disabled" tinderboxes.

for(int i=0;i<100,i++)
    ResetProp("tinderbox_"+i);

do
{
    int maxitems = 0;
    for(int i=0;i<100;i++)
    {
          activeitem = RandInt(1,100);
          if(activeitem > 75)
          {
                maxitems++;
                SetEntityActive("tinderbox_"+i, true);
          }
     }

    }
}    while(maxitems < 4);

I don't know if that would work, but the point is that every wave, if you call a function with that, it would reset the position of the tinderboxes in the starting area, and roll a random dice out of 100, and generate four random tinderboxes like that (assuming they were named "tinderbox_1", ...etc.). Also I wrote that in C++, angelscript may had do while loops differently.

04-10-2012, 09:31 PM
Find


Messages In This Thread
RE: Patrol Nodes don't work on spawned enemy - by Putmalk - 04-10-2012, 09:31 PM



Users browsing this thread: 3 Guest(s)