Really basic script won't work - I'm baffled

Post » Tue May 28, 2013 11:57 pm

Hey guys, I must be missing something super obvious here. I have a simple script that should enable an xmarker when the player enters it during a certain quest stage, but it wont work. No xmarker enabled, no children (In this case some NPCs) appear. Here's the script:

Event OnTriggerEnter(ObjectReference akActionRef)	If (DoOnce == 0) && (akActionRef == Game.GetPlayer()) && (FSMQ08.GetStage() == 30)		DoOnce = 1		Target.Enable()	EndIfEndEventObjectReference Property Target AutoInt Property DoOnce AutoQuest Property FSMQ08 Auto

In the properties I've set DoOnce to 0, filled FSMQ08 properly, and left Target blank. Then, I've placed 4 of these triggers in my area, and pointed Target to the xmarkers. The quest stage is correct in game, DoOnce should be 0, and I'm the player, so why do I not trigger this script?

When I set it up MONTHS ago I think I remember it working, and I'm back now to polish the quest, but they suddenly won't work? I've checked the script, the properties, the xmarker, and the NPCs. Everything is hooked up right.

Am I missing something really obvious here?

User avatar
Adrian Powers
 
Posts: 3368
Joined: Fri Oct 26, 2007 4:44 pm

Post » Tue May 28, 2013 10:17 pm

I use my do once like so:

property like this:
bool bDoOnce

Then you don't have to check 0 or 1, just !bDoOnce for false and bDoOnce for true.

if !bDoOnce; if false     ;do some chetelseif bDoOnce; if true     ;do true chet
User avatar
Marcia Renton
 
Posts: 3563
Joined: Fri Jan 26, 2007 5:15 am


Return to V - Skyrim