antstubell Posted June 11, 2019 Share Posted June 11, 2019 I run a OnHit Setstage script directly on a object which is also a quest alias. This works fine but adding a second script, a OnContainerChanged Setstage script (when player picks up the object he just hit) doesn't fire. I believe I read a long time ago that an object that is a quest alias cannot run more than one script directly on itself. Is this a fact and is there a way to accomplish this?Thanks. Link to comment Share on other sites More sharing options...
maxarturo Posted June 11, 2019 Share Posted June 11, 2019 Merge them, make them one script. Link to comment Share on other sites More sharing options...
antstubell Posted June 11, 2019 Author Share Posted June 11, 2019 So end the OnHit event and start a OnContainerChanged event in the same script? I didn't know you could do that i.e. run events one after the other in the same script. Link to comment Share on other sites More sharing options...
antstubell Posted June 12, 2019 Author Share Posted June 12, 2019 So I am obviously not doing this correct because if I add a second event to the script then the script doesn't work. The first event OnHit works alone but the second when added to the script stops the first firing - or something like that. Need some light shone upon this please. Quest Property MyQuest AutoMessage Property MyMSG AutoEvent OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)if (akAggressor == Game.GetPlayer())MyQuest.Setstage(10)MyMSG.show()endifEndEventEvent OnContainerChanged(ObjectReference newContainer, ObjectReference oldContainer)if (newContainer == Game.GetPlayer())MyQuest.Setstage(100)MyMSG.show()endifEndEvent Link to comment Share on other sites More sharing options...
IsharaMeradin Posted June 12, 2019 Share Posted June 12, 2019 If the object that the script is on is already loaded in the save file you are using, it may not reflect new script changes. Try testing on a new game and see if the issue persists. Link to comment Share on other sites More sharing options...
antstubell Posted June 14, 2019 Author Share Posted June 14, 2019 It seemed hit and miss if the 2 events fired but somehow it sorted itself out. I don't use saves when testing mods. I COC into the game.Thanks, Link to comment Share on other sites More sharing options...
Recommended Posts