Jump to content

Quest Script Actor AkKiller


Advint

Recommended Posts

I'm trying to work on a quest, in which one of the characters is non essential but is essential to the furthering the quest line, unless the player kills them. In which case the quest takes another turn; without knowing what could have been. I pretty much have an idea of how to handle this, but I feel that there is most certainly a better way. What I have worked up follows this routine:
 

if (MyQuest.getstage == 20)
MyQuest.SetStage(25)
MyQuest.SetObjectiveFailed(20)
MyQuest.SetObjectiveDisplayed(25)
endif

And it repeats that general if statement until it has accounted for all the times when the actor could have died along the way. Only thing is that this seems sloppy, and I would appreciate any help with making this much more efficient. Oh, and if you do have a better way please exemplify it as I am new to this and will require a reference to work off of.

I just realised I should probably use elseif as well

This is what I ended up with, minus the actual quest name and such:
MyExample.zip
Link to comment

http://www.creationkit.com/OnDeath_-_Actor

?

 

EDIT: I didn't see your attachment

 

EDIT: A possible solution could be to create a quest alias pointing to the actor, with an script that handles the ondeath event as shown in the CK wiki page.

 

About the if statement and multiple quest stages, it depends of the quest structure. Maybe you can use global variables instead of (or in addition to) quest stages to control the flow.

Link to comment

Do you think I could make the quest alias run the script I posted after the actor is dead? In order to reduce the overall load. I don't know much about polling or anything like that, as to whether the script is polled constantly. Or if attached directly to the actor the script I posted would just run upon death. The whole Idea is that upon the actors death the quest is able to branch out a bit, while still ending, or later on the actors death will have a minimal effect and the quest will continue while acknowledging the actors death.

I also don't know much about global variables, I probably read about it two months ago, and forgot. (I started this project in January and lost interest shortly after reading up on scripting)(Not because I found it hard, but because I simply lost interest) Regardless, I will try to read up on it again.

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use