Jump to content

Recommended Posts

Posted (edited)

Hello.

 

Im making a quest where i need to kill 8 different NPC's. I've set up a new script etc.

But i need to know which functions i could use.

 

Right now it's "Event OnDeath(Actor killer)" But that one makes the quest proceed once i've killed one of the bandits, whilst i need something to work for 8 npc's. Anyone know which function would work better?

 

Any help would be appriciated :)

Edited by ObLars
Posted

Maybe

 

if (Event OnDeath(Actor killer)

if (Event OnDeath(Actor killer)

if (Event OnDeath(Actor killer)

...

else

 

and so on while you use one npcs after another.

I'm not quite familiar with papyrus so maybe it won't work, just give it a try.

Posted

Maybe

 

if (Event OnDeath(Actor killer)

if (Event OnDeath(Actor killer)

if (Event OnDeath(Actor killer)

...

else

 

and so on while you use one npcs after another.

I'm not quite familiar with papyrus so maybe it won't work, just give it a try.

 

How this this work? Is it "Event OnDeath(Reference" ?

Posted

Are there no things like this?

 

if a=1 set x=1;

else set.a=a+1;

 

or more complex:

if a=1;

if b=1 set.x=1;

else set.a=a+1

 

The last thing will check if a=1 if not set.a=a+1. If a=1 and b=1 it will set.x=1. If a=1 but b=!0 it will set.a=a+1.

I don't mean that this code snippet is supposed to be useful to you, just an example of what to use if/else for. And Python supports if/else, doesn't it?

Posted

Try adding a int property to your quest script, ie KillCounter.

 

For the script on the NPCs, have them increment the counter by 1 when the actor dies. Something like this:

 

;;;;;

QuestScript property Quest01 auto ;"QuestScript" should be the actual name of your quest script

Event OnDeath(Actor akKiller)

Quest01.KillCounter += 1
if Quest01.KillCounter >= 8
	;do stuff
endif

EndEvent

;;;;;

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...