View Full Version : placeable scripting ? TSL

07-02-2009, 03:32 PM
Is there a script that would make a static placeable useable. For example, I'm using the pull-chain placeable, but I do not want the PC to use/activate it until its guard is defeated..then ok. I see there is a DoPlaceableObjectAction in nwnscripts, would that work. Script help please

Or maybe a conditional script on the placeable that requires the npc guard to be defeated.

07-04-2009, 10:15 AM
I've come up with this script, it compiled, but doesn't seem to work. I put it on the OnClosed script for a door. I want a journal entry to fire only after the door is closed and its guard is dead..Any thoughts to make it work?

void main() {
// Set the tags here.
object oNPC1 = GetObjectByTag("NPCtag");
object odoor1 = GetObjectByTag("doortag");
// Check if NPC is dead and door locked.
if ((!GetIsObjectValid(oNPC1) || GetIsDead(oNPC1))
&& (!GetIsObjectValid(odoor1) || GetLocked(odoor1)))

AddJournalQuestEntry("journal tag",50);

EDIT: I figured it out.....Moderators you can close this out. thx


I removed the specific tags for the npc,door, and journal for the posting.