Aller au contenu

Photo

thinking about traps


  • Veuillez vous connecter pour répondre
10 réponses à ce sujet

#1
azaz1234

azaz1234
  • Members
  • 82 messages

i'm trying to make traps work correctly w/flying and non-corporeal creatures [i.e., NOT go off when they pass over them...]. unfortunately nwnx doesn't hook the 'trap triggered' event, so just about everything i've come up with relies on using generic triggers. i've got something that works... kinda. it's pretty kludgey and convoluted and hand-wavey, though.

a player using a trap kit will [using nwnx] lay down a generic trigger 1m bigger than a typical trap. the trigger's on-enter script checks to see if the entering creature is flying or is in the trap-setter's party, and if it is, the script exits. otherwise, a trap of the appropriate type is spawned in at the trigger's location. a subsequent immediate search roll determines whether or not the newly-spawned trap is revealed. if the trap remains undiscovered, or if the entering creature is already within the trap area, the trap goes off. the trigger's on-exit event could be used to destroy the trap until the next go-round.

i'm not happy w/this approach because there are reliability issues, w/trap detection [esp when passive detection is used], triggering, and accurate trap generation. i'm just having trouble coming up w/a better solution.

thoughts ?
 



#2
Shadooow

Shadooow
  • Members
  • 4 470 messages

hm maybe you missed Community Patch?



#3
MrZork

MrZork
  • Members
  • 940 messages

To be fair, the CPP doc section on traps doesn't directly describe any changes to flying creatures or hooks into trap events.



#4
Shadooow

Shadooow
  • Members
  • 4 470 messages

right. sorry, i should be more clear

 

this functionality ís in 1.72beta using nwnx and nwncx_patch plugins it uses the list of apperances + variable FLYING int 1 (as establishedf in 1.71 documentation) to determine flying creatures - those then ignore ground traps



#5
azaz1234

azaz1234
  • Members
  • 82 messages

sounds promising !

 

[...] those then ignore ground traps

 

this is the key point. finding out which are flying is pretty easy, but how do they then simply ignore ground traps ?



#6
Shadooow

Shadooow
  • Members
  • 4 470 messages

this is the key point. finding out which are flying is pretty easy, but how do they then simply ignore ground traps ?

again this functionality is provided by nwnx_patch (or nwncx_patch) i hooked internal function that checks if trap is gona be fired or not.



#7
WhiZard

WhiZard
  • Members
  • 1 204 messages

You could also give flying and non-corporeal creatures the effect granting trap immunity.  It would be a slight addition to the OnSpawn script as well as require editing of the polymorph scripts to link the effects.



#8
Shadooow

Shadooow
  • Members
  • 4 470 messages

You could also give flying and non-corporeal creatures the effect granting trap immunity.  It would be a slight addition to the OnSpawn script as well as require editing of the polymorph scripts to link the effects.

Yes actually this should work as well. I think I decided for the NWNX as it wil enable it in every module automatically without relying on OnSpawn scripts.



#9
henesua

henesua
  • Members
  • 3 863 messages

What about doors and placeables? Fliers should not be able to avoid those traps.



#10
WhiZard

WhiZard
  • Members
  • 1 204 messages

With immunity to traps you are unable to use doors and placeables that are trapped.  You may still bash them without triggering the trap, however, the use prohibition also means that PCs with this immunity have an indirect way of knowing if a placeable/door is trapped without having to detect the trap or trigger it.

 

However, the main use for trap immunity is probably just for NPCs who have no need of chests, and do not typically open doors on their own.



#11
azaz1234

azaz1234
  • Members
  • 82 messages

these are all great ideas. thanks much for the tips, i think i've got some good possibilities to work with. :)