scripting a quest to kill someone?

Post » Fri Oct 23, 2009 3:43 pm

title. is there a command to check if someone is alive, for example?
User avatar
Robert Devlin
 
Posts: 3521
Joined: Mon Jul 23, 2007 2:19 pm

Post » Fri Oct 23, 2009 1:01 pm

You could make a script that changes a variable when the NPC is killed. I'm only just looking into scripting for the first time though.
User avatar
kristy dunn
 
Posts: 3410
Joined: Thu Mar 01, 2007 2:08 am

Post » Fri Oct 23, 2009 4:16 am

GetDead or GetDeadCount. The Dead Count is more for if you have multiple copies of the same creature in the game and the player needs to kill a certain amount. For just one NPC, use GetDead and the NPC's reference ID. http://geck.gamesas.com/index.php/GetDead
User avatar
Mr. Allen
 
Posts: 3327
Joined: Fri Oct 05, 2007 8:36 am

Post » Fri Oct 23, 2009 1:30 am

Thank you very much both of you, will experiment with this later!
User avatar
cutiecute
 
Posts: 3432
Joined: Wed Sep 27, 2006 9:51 am

Post » Fri Oct 23, 2009 8:20 am

GetDead or GetDeadCount. The Dead Count is more for if you have multiple copies of the same creature in the game and the player needs to kill a certain amount. For just one NPC, use GetDead and the NPC's reference ID. http://geck.gamesas.com/index.php/GetDead


sorry, where exactly do I put this? I want a dialogue option to only be available once the target is dead
User avatar
Danii Brown
 
Posts: 3337
Joined: Tue Aug 22, 2006 7:13 am

Post » Fri Oct 23, 2009 3:25 am

sorry, where exactly do I put this? I want a dialogue option to only be available once the target is dead

In the conditions for the line of dialog that you want it to affect. Right click in the condition box and say New. They select GetDead, and select your NPC's ref. Then says == 1. That should make the dialog only pop up when the NPC is dead.
User avatar
OTTO
 
Posts: 3367
Joined: Thu May 17, 2007 6:22 pm

Post » Fri Oct 23, 2009 7:03 am

In the conditions for the line of dialog that you want it to affect. Right click in the condition box and say New. They select GetDead, and select your NPC's ref. Then says == 1. That should make the dialog only pop up when the NPC is dead.


ahhhhhhhh! thank you very much :D!
User avatar
Barbequtie
 
Posts: 3410
Joined: Mon Jun 19, 2006 11:34 pm

Post » Fri Oct 23, 2009 2:34 pm

everyone in goodsprings immediately rushes off to kill my target!!! whats going on? :S
User avatar
RUby DIaz
 
Posts: 3383
Joined: Wed Nov 29, 2006 8:18 am

Post » Fri Oct 23, 2009 12:56 pm

That depends, what all did you change? Is your target near/in goodsprings, and are they in an enemy faction? That would cause everyone to attack them.
User avatar
Anne marie
 
Posts: 3454
Joined: Tue Jul 11, 2006 1:05 pm

Post » Fri Oct 23, 2009 2:09 pm

That depends, what all did you change? Is your target near/in goodsprings, and are they in an enemy faction? That would cause everyone to attack them.



i completely stripped factions out and started again! i made the target NPC a "wastelander" or something, even made that faction allies with GSfaction!

so basically i dont think its factions? the NPC is in the GSAbandonedshack cell, which isn't really in GS tbh....
User avatar
Lily Evans
 
Posts: 3401
Joined: Thu Aug 31, 2006 11:10 am

Post » Fri Oct 23, 2009 5:08 am

Post some scripts/quests setups here boy, let's see what's going on. NPCs generally don't attack someone unless
1. They are hostile towards them and can detect them
2. They are being explicitly scripted to do so, i.e.

someNPC.addScriptPackage gotoThatCell
if someNPC.getincell ThatCell
someNPC.startcombat TheTarget
endif

Your case sounds pretty weird... Are you messing around with the Run Goodsprings Run quest?
User avatar
Heather Stewart
 
Posts: 3525
Joined: Thu Aug 10, 2006 11:04 pm


Return to Fallout: New Vegas