Aller au contenu

Photo

Creating a Trap Friendly to a PC


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

#1
Thayan

Thayan
  • Members
  • 244 messages

I am working on a modification to our housing system where traps placed in a player's dynamically created house (Hunter's Housing system) get recreated when the building is re-entered. I've got it working, for the most part, as intended. However, I'm hoping someone can provide some guidance on how I can set a trap to 'friendly' or green to its creator if they re-enter the building. Basically, I'm looking to mimic the same behavior as if the PC had just placed the trap for the first time - where it shows up green for them and red for everyone else who detects it.

 

It appears that the CreateTrapXXX functions, while allowing for the thing to be spawned to one of the standard factions, won't allow a trap to be created as friendly to one person, and hostile to others. Does anyone know of a way that, via script (or maybe NWNX?) a trap can be created as friendly to one person?



#2
HipMaestro

HipMaestro
  • Members
  • 1 515 messages

Did you try creating a custom faction for the trap?



#3
henesua

henesua
  • Members
  • 3 882 messages

I wonder if this trap should be hostile to everyone, but then you could use the set friendly functions to the PC. Does that work on a trap?

 

I was also wondering if there is an NWNX function that allows you to change the reputation between two individuals without affecting the faction reputation.



#4
Squatting Monk

Squatting Monk
  • Members
  • 446 messages
nwnx_funcs has a SetTrapCreator() function.
  • kalbaern et henesua aiment ceci

#5
Thayan

Thayan
  • Members
  • 244 messages

Before going through the big procedure of setting up a custom faction hostile to everyone, and then making it friendly to the PC, I decided just to try spawning the traps as Defender or Merchant (which are neutral to the PC). They always appear red, so it seems to me that the faction parameter of those functions doesn't work..?

 

I did test that the SetTemporaryFriend function doesn't appear to work on traps/triggers either.

 

And I bet that SetTrapCreator would probably work....too bad it hasn't been ported to the Windows nwnx_funcs so I could test it. :(



#6
Shadooow

Shadooow
  • Members
  • 4 471 messages

Before going through the big procedure of setting up a custom faction hostile to everyone, and then making it friendly to the PC, I decided just to try spawning the traps as Defender or Merchant (which are neutral to the PC). They always appear red, so it seems to me that the faction parameter of those functions doesn't work..?

 

I did test that the SetTemporaryFriend function doesn't appear to work on traps/triggers either.

 

And I bet that SetTrapCreator would probably work....too bad it hasn't been ported to the Windows nwnx_funcs so I could test it. :(

see my edit

 

http://www.nwnlexico...1091&oldid=8013

 

if its relevant, for ground traps it should work


  • Squatting Monk et WhiteTiger aiment ceci