Skip to content

Any way to create traps as if a PC had set them?

CreateTrapAtLocation can create a trap trigger with a specified standard faction. Pretty useful for respawning traps and the like!

What I'm trying to do now is build some custom traps that PCs are able to set. This is a bit more complicated, since the standard or custom factions won't necessarily correspond to a PC's faction. I want a similar behavior to when a PC sets a standard trap - the trap should be friendly to the PC and their party, but hostile to creatures the PC is hostile to.

Is there any way to do this in NWScript? Bear in mind, this is in a PW environment where PCs may have their own unique faction settings (No guarantees that the PC is friendly to Defender.)

I can't find anything in the docs or custom content guides about this. Has anyone else found a way?

Comments

  • ProlericProleric Member Posts: 1,282
    I guess there's some reason why you need a script, as opposed to PCs setting the custom trap manually?

    Tricky, owing to the known bug in ActionUseSkill which prevents trap-setting.

    Long shot - have you tried ChangeFaction on the trap after it's created? Works for creatures, but not sure about traps.

Sign In or Register to comment.