Author Topic: Trapping a chest makes it Unopenable  (Read 313 times)

Legacy_BelowTheBelt

  • Hero Member
  • *****
  • Posts: 699
  • Karma: +0/-0
Trapping a chest makes it Unopenable
« on: June 10, 2014, 02:32:51 am »


               

Does anyone have experience with dynamically applying traps on objects (chests, specifically) causing the object to be unopenable?


 


I've got the strange bug that seems to have cropped up whereby my random chest creation scripts, when it applies a trap to a chest, results in the chest not being able to be opened.


 


The chest can be examined, bashed, destroyed, selected, etc... but when clicked-on to open, nothing.  The OnOpen script does not fire.  The trap is applied and visible.


 


A similar chest without a trap opens just fine.


 


It appears to be caused by the CreateTrapOnObject (TRAP_BASE_TYPE_MINOR_FROST, oChest);


 


I've even tried creating new versions of the scripts and importing them to replace the existing scripts in the event that something had become corrupted, to no avail.


 


Any suggestions?


 


 



               
               

               
            

Legacy_kalbaern

  • Hero Member
  • *****
  • Posts: 1531
  • Karma: +0/-0
Trapping a chest makes it Unopenable
« Reply #1 on: June 10, 2014, 03:23:24 am »


               

Try something like this:


CreateTrapOnObject (TRAP_BASE_TYPE_MINOR_FROST, oChest);
    SetTrapActive(oChest);
    SetTrapOneShot(oChest);
    SetTrapDisarmable(oChest);
    SetTrapRecoverable(oChest);
    SetTrapDetectable(oChest);
    SetTrapDetectDC(oChest, 20);//whichever DCs you desire here
    SetTrapDisarmDC(oChest, 25);//can also make it semi-random by using
                                                     //d8+16 (or whatever range you desire)


               
               

               
            

Legacy_BelowTheBelt

  • Hero Member
  • *****
  • Posts: 699
  • Karma: +0/-0
Trapping a chest makes it Unopenable
« Reply #2 on: June 10, 2014, 04:55:59 am »


               

Thanks Kalbaern, unfortunately that doesn't seem to affect it, though.  Still doesn't respond when clicked to open.



               
               

               
            

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
Trapping a chest makes it Unopenable
« Reply #3 on: June 10, 2014, 06:53:23 am »


               

Are you trying to open a chest while it is trapped, or after the trap has been taken care of?


 


Chests shouldn't open when there is an unresolved trap attached.  The trap would first need to resolve itself before the chest will open.  If you are giving characters immunity to traps they will not trigger any traps and thus when they click on a trapped chest, it will not open.  This can also be reproduced by using a "key" for the traps in such a way that both the "key" and the trap are flagged not to be destroyed when they interact.



               
               

               
            

Legacy_BelowTheBelt

  • Hero Member
  • *****
  • Posts: 699
  • Karma: +0/-0
Trapping a chest makes it Unopenable
« Reply #4 on: June 10, 2014, 07:30:58 pm »


               

Gah!  That was it, WhiZard.  My test PC was set up as invulnerable.  When I tried it with invulnerability turned off, trapped chests open and the trap is triggered just fine.  No wonder there hadn't been any reports of that 'bug'.


 


Thanks, guys.