OnEnter Script not working

Post » Sat Nov 17, 2012 9:04 pm

I'm trying to make a quest where when a door is unlocked (one that teleports to a dungeon) my quest advances from Stage 10 to Stage 20 but even when I put the defaultactivateonopen it just leaves my quest marker on the door and doesnt advance the quest... any help would be nice on this as I'm a little new and just need to figure out why an defaultOnOpen set to when a door is opened and teleport doesn't advance the stage...

Do I need to set an OnLoad to something on the Interior/ so that when I finish teleporting into the dungeon it advances instead of the OnOpen?
User avatar
Isabella X
 
Posts: 3373
Joined: Sat Dec 02, 2006 3:44 am

Post » Sat Nov 17, 2012 11:14 pm

You're doing it wrong, way wrong.

What you gotta do is create an alias for your door in your quest and create & attach a script to it that has an OnOpen event.

Put this in your door's ReferenceAlias script:
event OnOpen(ObjectReference akActionRef)if(GetOwningQuest().GetStage() == 10)  GetOwningQuest().SetStage(20)endifendevent

Put any other scripting stuff you need inside the stage you just set to.

Everything should work this way. Remember, aliases are your best friends. :smile:
User avatar
Tha King o Geekz
 
Posts: 3556
Joined: Mon May 07, 2007 9:14 pm


Return to V - Skyrim