Jump to content

Multiple scripts on quest alias


Recommended Posts

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

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 Auto
Message Property MyMSG Auto

Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)

if (akAggressor == Game.GetPlayer())
MyQuest.Setstage(10)
MyMSG.show()

endif
EndEvent

Event OnContainerChanged(ObjectReference newContainer, ObjectReference oldContainer)
if (newContainer == Game.GetPlayer())
MyQuest.Setstage(100)
MyMSG.show()

endif
EndEvent

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...