badassmthfck Posted March 20, 2018 Share Posted March 20, 2018 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 sequenceWhat 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 More sharing options...
TheWormpie Posted March 21, 2018 Share Posted March 21, 2018 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 More sharing options...
Recommended Posts