Author Topic: Limiting an Autospawn problem...  (Read 380 times)

Legacy_datamaster

  • Jr. Member
  • **
  • Posts: 94
  • Karma: +0/-0
Limiting an Autospawn problem...
« Reply #15 on: May 06, 2011, 12:40:14 am »


               Ok just tried something.  I also made a new module just to test this script.
And yes it does do like you say Lightfoot.  But in the first module it is still spawning
creatures each HB.  Which means the problem is more than likely elsewhere in the
module.
What's a good way to track it down?
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Limiting an Autospawn problem...
« Reply #16 on: May 06, 2011, 12:44:17 am »


               Ok, Simple enough.   The Problem is that ResRef's are all lower case.  When you are setting you string for the Monster to spawn you are useing all upper case characters.  This is not a problem for creating the monster.  The engine automaticly changes then to lower case to creat the creature.  The problem is when we are compairing the upper case string to the lower case string they do not match.  Hence we are getting a creature count of 0.   a simple fis is to change the line.

string sMob = GetLocalString(oPC, "mnstrspwntyp");

to

string sMob = GetStringLowerCase(GetLocalString(oPC, "mnstrspwntyp"));

@Werehound   Where i agree with you that the ondeath methoid is normall better.  I think we have a speical case here.  For one the monster can change.  It can in fact change to every creatue in the bif's.  So even if we changed the default ondeath script, we would have to have it effect every creature in the module.  The hook in the module to disreguard is going to take just as much as one campfire saying return every round.  The other thing that make the HB not that bug of a deal is that it is a small area.
               
               

               
            

Legacy_datamaster

  • Jr. Member
  • **
  • Posts: 94
  • Karma: +0/-0
Limiting an Autospawn problem...
« Reply #17 on: May 06, 2011, 12:55:17 am »


               That works.  Thanks! Both of you!