Jump to content

[LE] Help a noob advance quest stages in creation kit


Recommended Posts

What I want to do is spawn a boss enemy after dealing with several mobs. Essentially I need to advance the quest by a set amount on each subsequent kill, however I haven't been able to figure it out. The script I used earlier went as follows:

Event OnDeath(Actor killer)
Advquestondeath.SetStage(20)
EndEvent
For obvious reasons, this can cause sequencing errors if the player kills mobs out of one specific sequence
What I need is for this "Advquestondeath.SetStage(20)" to become "Advquestondeath.SetStage(current quest stage+10)".
Any and all help will be greatly appreciated!
Link to comment
Share on other sites

This does what you want.

int currentStage = Advquestondeath.GetStage()
int nextStage = currentStage + 10
Advquestondeath.SetStage(nextStage) 

Be aware though that GetStage returns the highest completed stage in the quest, which means that the snippet of code above will set the stage to (highest completed stage + 10) and not (latest completed stage + 10).

Link to comment
Share on other sites

  • Recently Browsing   0 members

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