Author Topic: Randomazery!  (Read 335 times)

Legacy_Leurnid

  • Sr. Member
  • ****
  • Posts: 473
  • Karma: +0/-0
Randomazery!
« on: May 31, 2012, 07:11:18 am »


               I am working on having some placeables randomly appear and disappear via script. I found several scripts/demo-mods in the vault that do things similar enough to what I want that I can make it work, but I have found a lot of variety in their methodology: some via triggers, others use onHB, and probably some other ways too... I haven't looked under the hood of all of them yet.

I thought before I dug in too far onto one particular solution, I would tap the collective smarts here and ask for strategies and pitfalls for 'stuff randomly appearing and vanishing'.  This seems like a common enough dungeon trick/trap that at least a few of you have probably done something with it, and I am hoping to learn from others before I learn the hardway (by mistake) on my own.
               
               

               
            

Legacy_Baragg

  • Sr. Member
  • ****
  • Posts: 496
  • Karma: +0/-0
Randomazery!
« Reply #1 on: May 31, 2012, 12:25:41 pm »


               Hb scripts are a bit more resource intensive.
               
               

               
            

Legacy_ehye_khandee

  • Hero Member
  • *****
  • Posts: 1415
  • Karma: +0/-0
Randomazery!
« Reply #2 on: May 31, 2012, 12:37:16 pm »


               The area on_enter and on_exit scripts are good places to put the scripts that make/destroy the randomized items imho.
               
               

               
            

Legacy_Leurnid

  • Sr. Member
  • ****
  • Posts: 473
  • Karma: +0/-0
Randomazery!
« Reply #3 on: May 31, 2012, 06:04:14 pm »


               I was planning on using tagged WPs, then have triggers or proximity checks (and area's on-enter, thanks for that e_k) roll some dice, and based on that, spawn placeables at tagged WPs and/or destroy others already spawned.

Only PC's will fire the script, and it will store the time locally to the area when the spawns-destroy loop fires, and check that to make sure enough time has passed before it does it again.
               
               

               
            

Legacy_nwnsmith

  • Full Member
  • ***
  • Posts: 125
  • Karma: +0/-0
Randomazery!
« Reply #4 on: June 02, 2012, 10:06:35 pm »


               On enter set the appearance of the placeable. Name their tags to increment up placeable_1, placeable_2, etc. Then loop through them and set their appearance to a list that you predefine and make one an invisible object that way you don't need to create items at waypoints. The on enter can tie in to your clean up script if you have one. That way they wont change if any PCs are already in the area. I run the same system to randomize all sorts of things in my areas including randomized commoners.
               
               

               


                     Modifié par nwnsmith, 02 juin 2012 - 09:08 .
                     
                  


            

Legacy_Leurnid

  • Sr. Member
  • ****
  • Posts: 473
  • Karma: +0/-0
Randomazery!
« Reply #5 on: June 02, 2012, 10:45:46 pm »


               

nwnsmith wrote...

On enter set the appearance of the placeable. Name their tags to increment up placeable_1, placeable_2, etc. Then loop through them and set their appearance to a list that you predefine and make one an invisible object that way you don't need to create items at waypoints. The on enter can tie in to your clean up script if you have one. That way they wont change if any PCs are already in the area. I run the same system to randomize all sorts of things in my areas including randomized commoners.


How would you script the appearance shifting?