Script problem? Can't Set stage upon entering trigger area.

Post » Wed Jun 20, 2012 5:19 am

Hey, I am having difficulty getting my trigger to set a new stage. I want for the stage to change and the message to display when the player enters the trigger box (just before encountering the first dungeon boss).

Here is what I have for script in the trigger box...


Scriptname JWQBoss1Script extends ObjectReference

Quest Property JWRTHQuest Auto

Event OnTriggerEnter(ObjectReference akActionRef)

If akActionRef == Game.GetPlayer()
JWRTHQuest.SetStage(14)
JWRTHQuest.SetObjectiveDisplayed(14)
EndIf

EndEvent
User avatar
James Hate
 
Posts: 3531
Joined: Sun Jun 24, 2007 5:55 am

Post » Wed Jun 20, 2012 11:41 am

Are you sure the quest is running? That would be my first thought.

Second thought...put a Debug.Notification("Player entered the trigger") in the if block to make sure.

Third thought: Do you want this stage to be set every time the player enters this trigger, or just the first time? If the latter, you'll want to set a boolean "AlreadyTriggered" and check that as well as Game.GetPlayer()
User avatar
victoria johnstone
 
Posts: 3424
Joined: Sat Oct 14, 2006 9:56 am

Post » Wed Jun 20, 2012 2:57 am

Third thought: Do you want this stage to be set every time the player enters this trigger, or just the first time? If the latter, you'll want to set a boolean "AlreadyTriggered" and check that as well as Game.GetPlayer()
Or you can use http://www.creationkit.com/States_(Papyrus) and avoid creating a new property/field.
User avatar
jason worrell
 
Posts: 3345
Joined: Sat May 19, 2007 12:26 am

Post » Wed Jun 20, 2012 7:00 am

OP, thanks for starting this thread, as I was working in this very thing last night and never could get it to trigger. But my suspicion is that it was something I missed in the actual trigger primitive itself which are a little different than what we did in GECK. Could someone explain what we need to do differently now? I finally found a setting with a dropdown of what I assumed were different primitive types, and set mine for Trigger (of some type). I’m at the office right now, and can’t look, but I believe that’s what it was. Pretty much all I did was draw the Prim, give it an ID, and add the script to it and declare the Object Reference property. What did I miss?
User avatar
Gill Mackin
 
Posts: 3384
Joined: Sat Dec 16, 2006 9:58 pm


Return to V - Skyrim