shademonster2003
Jun 25 2004, 08:55 PM
Hey guys,
I'm new to scripting, and I've started a pretty massive mod. I read a lot of documentation on scripts, and I was doing fairly well. But, I've hit a snag.
My problem: I have an NPC set up to disable, change location, and then enable. All of this over a 3-day time period. It's a global script triggered by a dialogue result and is self-terminating.
This is what happens: The NPC (located in an exterior Seyda Neen cell) adheres to the timer and disables after 40 seconds. At that point, the NPC SHOULD transport to the new location (the tavern in Pelagiad). Three days later (using a day counter script), the NPC SHOULD enable in the new location and the script terminates. However, if the player is in the same cell (the tavern), the NPC will not enable. Can anyone tell me why this happens and/or how to fix it? Thanx in advance, guys.
-Monster
PierreBeauregard
Jun 25 2004, 09:35 PM
Try disabling, and then enabling *just* before you use postioncell. I doubt the player will notice the difference.
shademonster2003
Jun 28 2004, 01:21 AM
Ok. I tried that, and it didn't seem to work. I'm copying the script in here for perusal. Let me know if I've screwed something up or if anyone has a suggestion.
begin GCVC_pelagiadtrans
short dayspassed
short today
short state
float timer
short timerstart
set timer to ( timer + GetSecondsPassed )
if ( timer > 20 )
set timerstart to 1
set timer to 0
endif
if ( today != Day )
set today to Day
set dayspassed to ( dayspassed + 1 )
endif
if ( timerstart == 1 )
disable GCVC_Aerana_Burador
endif
if ( dayspassed >= 3 )
enable GCVC_Aerana_Burador
GCVC_Aerana_Burador -> PositionCell, 228, -96, 257, 90, "Pelagiad, Halfway Tavern"
set state to 1
endif
if ( state == 1 )
stopscript GCVC_pelagiadtrans
endif
end
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.