Hi,
I am fairly new to this, but am trying to set up a quest. I have created a player house, but did not want it to be that easy. I wanted people to have to clear the house of bandits before they could have it.
The house has 9 leveled bandits in it and I want to set up a script that will move to the next stage/objective when all of the are dead.
I have never used papyrus (or any other Fallout/oblivion) type scripts until a few days ago, but know VB/DOS/Powershell, so am not a total noob when it comes to scripting. That means I can (almost) follow the logic through on a script, but do not know the scructure/syntax for doing things that I cannot already find on the web.
I have set up the 9 leveled actors as aliases, and thought that I could attache the following to all of them as as they died the Global Variable would just count up and then when all 9 were dead, it would move on.
Am I going about this the wrong way, or have I just got some tweeks to make?
Script is as follows:
================
Scriptname SpoonLLKillAllHouseEnemies extends ReferenceAlias
Quest Property SpoonLLSCRescueQuest Auto
GlobalVariable Property SpoonLLEnemyDead Auto
auto State waiting
Event OnDeath(Actor killer)
Int count = SpoonLLEnemyDead.Mod(1.0) As Int ; Add 1 and then fetch the total
If count == 9
SpoonLLSCRescueQuest.SetObjectiveDisplayed(50)
SpoonLLSCRescueQuest.SetStage(50)
Endif
EndEvent
EndState
State inactive
EndState