Author Topic: spawn without heartbeats  (Read 289 times)

Legacy_Surek

  • Full Member
  • ***
  • Posts: 169
  • Karma: +0/-0
spawn without heartbeats
« on: June 18, 2013, 12:30:10 am »


                Does anyone have any suggestions on a reliable spawn system
that spawns creatures that does not use heartbeats?
               
               

               
            

Legacy_Fester Pot

  • Hero Member
  • *****
  • Posts: 1698
  • Karma: +0/-0
spawn without heartbeats
« Reply #1 on: June 18, 2013, 12:43:55 am »


               No, but you can use OnEnter to respawn creatures if the area is clear of PCs.

FP!
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
spawn without heartbeats
« Reply #2 on: June 18, 2013, 12:52:54 am »


               Need more info on what you are looking for.   I can think of no systems that use HB's
               
               

               
            

Legacy_Knight_Shield

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +0/-0
spawn without heartbeats
« Reply #3 on: June 18, 2013, 03:09:40 am »


               I was looking at all kinds of spawn scripts myself today.I seen this one the nwn2 vault. I was wondering if this can be fitted for nwn? It's looks pretty easy to use.



// crypt_onenter
// by Gilgon Avalrock
// this script, when placed in the OnEnter slot for an area, will find all waypoints tagged WP_SPAWNSKEL,
// and randomly create a skeleton at that location.  This will only happen once for each PC that enters
// the area, and the difficulty and number of creatures will increase based on the PC's overall level.
// Just replace the monster pallete names with those of whatever creatures you want in your random table,
// and you can adjust the numbers below to change the probablilities.


void main()
{
   int eChance;
   string sTemplate;
   location lLoca;
   int nRoll,i;
   object oEntered = GetEnteringObject();

   //Makes sure it's a PC entering the area for the first time(don't want looping scripts or too many monsters)
   if (GetIsPC(oEntered) && GetLocalInt(OBJECT_SELF,"m_n"+GetPCPlayerName(oEntered))==0 ) {//store a local int with the player's name

       SetLocalInt(OBJECT_SELF,"m_n"+GetPCPlayerName(oEntered),1);
       int nlvl = GetLevelByPosition(1,oEntered)+GetLevelByPosition(2,oEntered)
+GetLevelByPosition(3,oEntered);
       object oWaypoint = GetFirstObjectInArea(OBJECT_SELF);
       while(GetIsObjectValid(oWaypoint)) //loop through all objects in area
       {
           if(TestStringAgainstPattern("WP_SPAWNSKEL",GetTag(oWaypoint))){ //finds all waypoints tagged WP_SPAWNSKEL (change this to whatever tag you want)
               lLoca = GetLocation(oWaypoint);
               eChance = d100(1);
               if (eChance > (5+(3*(20-nlvl)))) //chance of a spawn (38% to 95% based on level)
               {
                   nRoll = d20(1)+nlvl-1;  //results range from 1-20 to 20-40 based on level
                   if (nRoll <= 10) {      //1-10
                       sTemplate = "nw_skeleton";
                   }else if (nRoll <= 20) {//11-20
                       sTemplate = "nw_skelmage";
                   }else if (nRoll <= 25) {//21-25
                       sTemplate = "nw_skelpriest";
                   }else if (nRoll <= 30) {//26-30
                       sTemplate = "nw_skelwarr01";
                   }else if (nRoll <= 35) {//31-35
                       sTemplate = "nw_skelwarr02";
                   }else {                 //36-40
                       sTemplate = "nw_skelchief";
                   }
                   CreateObject(OBJECT_TYPE_CREATURE, sTemplate,lLoca, TRUE);
                   SetIsDestroyable(TRUE);
               }
           }
           oWaypoint = GetNextObjectInArea(OBJECT_SELF);
       }
   }
}
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
spawn without heartbeats
« Reply #4 on: June 18, 2013, 05:38:37 am »


               NESS works with pseudo HB on the area. takes a little configuring but the comments in teh scripts and documentation guide you through it.