DOWNLOAD MODS
Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...
Spoon
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Tutorials
Gallery
Store
Events
Posts posted by Spoon
-
-
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
Script Requests
in Skyrim Script Repository
Posted
Managed to do it in the end:
Scriptname SpoonLLKillHouseStorm extends ReferenceAlias
Quest Property SpoonLLSCRescueQuest Auto
Actor Property E1 Auto
Actor Property E2 Auto
Actor Property E3 Auto
Actor Property E4 Auto
Actor Property E5 Auto
Actor Property E6 Auto
Actor Property E7 Auto
Actor Property E8 Auto
Actor Property E9 Auto
Int Property EnemyDeadCount Auto
Event OnDeath(Actor killer)
If E1.IsDead() == True
EnemyDeadCount = EnemyDeadCount + 1
EndIf
If E2.IsDead() == True
EnemyDeadCount = EnemyDeadCount + 1
EndIf
If E3.IsDead() == True
EnemyDeadCount = EnemyDeadCount + 1
EndIf
If E4.IsDead() == True
EnemyDeadCount = EnemyDeadCount + 1
EndIf
If E5.IsDead() == True
EnemyDeadCount = EnemyDeadCount + 1
EndIf
If E6.IsDead() == True
EnemyDeadCount = EnemyDeadCount + 1
EndIf
If E7.IsDead() == True
EnemyDeadCount = EnemyDeadCount + 1
EndIf
If E8.IsDead() == True
EnemyDeadCount = EnemyDeadCount + 1
EndIf
If E9.IsDead() == True
EnemyDeadCount = EnemyDeadCount + 1
EndIf
If EnemyDeadCount == 9
SpoonLLSCRescueQuest.SetObjectiveDisplayed(50)
SpoonLLSCRescueQuest.SetStage(50)
Endif
EndEvent