Hitman Script?

Post » Sat May 28, 2011 6:05 pm

Hey there!

I was wondering if it would be possible to add a dialog topic to every NPC in the game. When I select that topic it "Marks" that NPC. Then when I go talk to a certain unique NPC that I will create, I have the option to "Take out" the NPC I have marked. The Hitman will then use an AI Package to actually go and kill the target then return to his original position. Perhaps getting the Hitman to use an AI Package? Possibly just a timer? eg, after two hours the marked NPC will die or something?

Thanks in advance.

- Shadowform.
User avatar
Robyn Howlett
 
Posts: 3332
Joined: Wed Aug 23, 2006 9:01 pm

Post » Sat May 28, 2011 10:02 pm

1. Create a new quest

2. Add a script with a reference variable ("victim") and a (short "hired")

3. Add the topic to every NPC (Condition = Not your hitman AND getquestvariable hired == 0)

4. In the "Just you wait!"-topic's result use "set victim to Getself"

5. In the hitman's "kill Mr. So-and-So" topic (condition: hired == 0 AND victim != 0) use "set hitmanquest.hired to 1"


The simplest quest's script would be:

scn hitmanscriptref victimshort hiredbegin GameModeif hired    if Player.GetInCell victim        victim.killactor YourHitmansID 1        set victim to 0        set hired to 0    endifendifend


Once you've paid the hitman, the next time you enter the cell with the victim he will die from a headshot.




Another way would be using a token (non-playable item) using this script

scn hitmantokenbegin OnLoadref victimif hitmanquest.hired    set victim to GetContainer    victim.killactor YourHitmansID 1    set hitmanquest.counter to hitmanquest.counter - 1    if hitmanquest.counter == 0        set hitmanquest.hired to 0    endif    removemeendifend



The quest script only consists of two variables: hired and counter.

In the mark-for-dead topic you use
additem deathmark 1
set hitmanquest.counter to hitmanquest.counter + 1



In the hitman's dialogue you then have the number of deathmarks in the counter and can use it to negotiate a good price for killing all of them at once. You still set hired to 1 and everyone who has the mark will die next time you visit.
User avatar
meg knight
 
Posts: 3463
Joined: Wed Nov 29, 2006 4:20 am

Post » Sat May 28, 2011 2:28 pm

1. Create a new quest

2. Add a script with a reference variable ("victim") and a (short "hired")

3. Add the topic to every NPC (Condition = Not your hitman AND getquestvariable hired == 0)

4. In the "Just you wait!"-topic's result use "set victim to Getself"

5. In the hitman's "kill Mr. So-and-So" topic (condition: hired == 0 AND victim != 0) use "set hitmanquest.hired to 1"


The simplest quest's script would be:

scn hitmanscriptref victimshort hiredbegin GameModeif hired    if Player.GetInCell victim        victim.killactor YourHitmansID 1        set victim to 0        set hired to 0    endifendifend


Once you've paid the hitman, the next time you enter the cell with the victim he will die from a headshot.




Another way would be using a token (non-playable item) using this script

scn hitmantokenbegin OnLoadref victimif hitmanquest.hired    set victim to GetContainer    victim.killactor YourHitmansID 1    set hitmanquest.counter to hitmanquest.counter - 1    if hitmanquest.counter == 0        set hitmanquest.hired to 0    endif    removemeendifend



The quest script only consists of two variables: hired and counter.

In the mark-for-dead topic you use
additem deathmark 1
set hitmanquest.counter to hitmanquest.counter + 1



In the hitman's dialogue you then have the number of deathmarks in the counter and can use it to negotiate a good price for killing all of them at once. You still set hired to 1 and everyone who has the mark will die next time you visit.


Thanks. I'll give it a shot.
User avatar
Vicki Gunn
 
Posts: 3397
Joined: Thu Nov 23, 2006 9:59 am


Return to Fallout: New Vegas