flyddon Posted August 1, 2020 Share Posted August 1, 2020 In the quest under Quest Stages tab, I haveon stage 37(in the Papyrus Fragment) NGIJPlayerNeutralThalmorIS.SetEnemy(PlayerFaction)Alias_ThalmorISKeep.GetActorRef().startcombat(Game.GetPlayer())Which causes the Thalmor and player to fight.I want to move the stage to 40 once the Thalmor is killed.Is there a script that would detect when the thalmor dies? if so does someone have that script that does that?The Thalmor is UniqueActor and is the quest Aliases. *UPDATE*Never Mind figured it out Event OnDeath(Actor akKiller) if (akKiller == Game.GetPlayer()) NGIJ_SavingLN.SetStage(40) endIfendEvent UPDATE to the UPDATE...Does not work. As soon as I speak to the Thalmor it apparently moves stage to 40 not upon his death... :sad: So if anyone has any ideas. Link to comment Share on other sites More sharing options...
flyddon Posted August 1, 2020 Author Share Posted August 1, 2020 SO I know your just dying to know... ok so 2 hours later... I had placed the setstage to 40 in the "end" of the ForceGreet package (the dialog was only 2 lines) so as soon as I spoke to the thalmor it ran that ending script. That's why the stage jumped to 40. 2nd thing This is the finial script that worked (I placed this script in the Actor's Papyrus Scripts area, just below the ID and name.) Scriptname NGIJ_ThalmorDeath extends ObjectReference ObjectReference Property ThalmorIS Auto Quest Property NGIJ_SavingLN Auto Event OnDeath(Actor akKiller) if (akKiller == Game.GetPlayer())Debug.MessageBox("I died by the player") NGIJ_SavingLN.SetStage(40) endIfendEvent This of course works when the player kills the NPC, I don't know if it will work if follower kills NPC. 1 Link to comment Share on other sites More sharing options...
Evangela Posted August 1, 2020 Share Posted August 1, 2020 The game recognizes all kills from followers and summons as player kills. This is an inconvenience most of the time, but in your case not at all. Link to comment Share on other sites More sharing options...
flyddon Posted August 1, 2020 Author Share Posted August 1, 2020 Your right! I tested this out last night and works perfectly (for my needs). Link to comment Share on other sites More sharing options...
cumbrianlad Posted August 3, 2020 Share Posted August 3, 2020 Ooh! It's a good job I don't allow followers in a certain part of my mod, if their actions are blamed on the player! I didn't know about that. Come to think of it, I do have a pet Dwarven Spider that is allowed in there, though. It uses a levelled spell of Lightning Bolt that goes way over vanilla. At the top end it does 4x vanilla 'Chain Lightning' damage. I just hope none of my peaceful Falmer run between the little stealth spider and the Dwarven enemies!... dead friendly Falmer and bad outcome for the player, later in the quest... ... unless it doesn't count as a follower? It has its own framework, so isn't tied into anything vanilla. Btw, I'd use 'PlayerRef' rather than 'Game.GetPlayer()'. It's way faster. In this instance, I think you're just calling it once, so it may not matter, but in my case there are 8 'Friendly Falmer' that could get killed in quick succession, if the player's daft enough to ignore the strict instruction not to kill them, written on a poster that they must look at in letters half a mile high! In that sort of situation definitely don't use 'Game.GetPlayer()' Link to comment Share on other sites More sharing options...
Evangela Posted August 4, 2020 Share Posted August 4, 2020 Actor playerRef Event OnInit() playerRef = Game.GetPlayer() EndEvent Event ..... EndEvent Function .... EndFunction Never have to worry about multiple calls to GetPlayer(). Link to comment Share on other sites More sharing options...
Recommended Posts