Author Topic: encounters. Help pls  (Read 314 times)

Legacy_Cursed Eclipse

  • Full Member
  • ***
  • Posts: 132
  • Karma: +0/-0
encounters. Help pls
« on: May 09, 2014, 08:49:35 am »


               

Let's suppose that i have five encounters in an area.

Every encounters counts 4 different creatures (hostile faction).


 


I would like a creature at random between those present in the econunters covers the role of the boss of the area.


I have already a function that takes care of changing the name and the size of the creature,but my problem is that I do not know when and how to execute it.


 


i was thinking to something like:



if(Random(10) > (8))
     {
    ExecuteScript("custom_script" OBJECT_SELF) //script change name and size.
    }

In OnSpawn(nw_c2_default9) of the creature


 


 


but doing this way I might have more bosses in one area,  when i want just one boss for area.


 


I have already set the variables on the creatures but they serve for another system that I use: http://nwvault.ign.c...2#commentmarker


maybe they can be recycled? ...


 


Any idea?



               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
encounters. Help pls
« Reply #1 on: May 09, 2014, 04:38:47 pm »


               Set a local int on the area when the first boss has been created. Check its value OnSpawn to prevent a second boss.
               
               

               
            

Legacy_Cursed Eclipse

  • Full Member
  • ***
  • Posts: 132
  • Karma: +0/-0
encounters. Help pls
« Reply #2 on: May 21, 2014, 06:52:51 pm »


               i did like Proleric suggest. Work fine thanks.




 I was wondering if it was possible to set a local int on the monster that spawn from the encounter when activated (maybe using OnEnter or OnUser define event ?)