Been fiddling with this script for hours, as part of my Imperial Knights mod, to no avail. Wondering if anyone could quickly point out some problem/something that I'm missing (sometimes it just takes another pair of eyes.... ) It's tied to an NPC on a boat, whom you approach with another NPC (named Sa'Dranjirra) in tow. The NPC aboard detects the proximity of Sa'Dranjirra to the PC. If the conditions are satisfied, I desire the script to do the following:
-On-boat NPC ForceGreetings PC (works)
-ForceGreeting "goodbye" automatically triggers next portion of script, which disables PC controls and fades out the screen (works)
-During fade-out period, PC is PositionCell'ed onto the boat (works)
-During fade-out period, Sa'Dranjirra is PositionCell'ed onto the boat in a slightly different spot. (NOT WORKING)
-During fade-out period, On-boat NPC is rotated to face the PC in his/her new position (works)
-Screen fades in, PC controls restored, and On-boat NPC ForceGreetings again. (works)
What's NOT WORKING is the PositionCell command tied to the following NPC. She just remains in her former spot even after the PC's been teleported and what not. I'm almost positive that it's not a problem with PositionCell, as I've pulled off NPC teleportation with a global script...perhaps something to do with it being tied to a local script?
Thanks for any insight ahead of time. Code below:
Begin ik_SilmDarScriptshort noloreshort doOncefloat timer;global ik_SaDranProximityif ( GetJournalIndex "IK_SmuggleRecruit" >= 10 )if ( GetJournalIndex "IK_SmuggleRecruit" < 100 ) Enableelse DisableendifelseDisableendifif ( MenuMode == 1 )returnendifif ( doOnce > 0 )if ( doOnce < 4 ) Set timer to ( timer + GetSecondsPassed ) ;MessageBox "timer = %.0f" timerendifendifif ( doOnce == 0 )if ( GetDistance Player <= 512 ) if ( ik_SaDranProximity ) == 1 ForceGreeting Set doOnce to 1 return endifendifelseif ( doOnce == 1 )DisablePlayerControlsFadeOut 1.5Set doOnce to 2returnelseif ( doOnce == 2 )if ( timer > 1.5 ) "ik_sa'dranjirra"->PositionCell -67762 -84961 30 5 "Firemoth Region (-9, -11)" "ik_sa'dranjirra"->AiWander 0 0 0 0 Player->PositionCell -67737 -84827 14 245 "Firemoth Region (-9, -11)" PositionCell -67841 -84852 14 74 "Firemoth Region (-9, -11)" FadeIn 1.5 Set doOnce to 3 Set timer to 0 returnendifelseif ( doOnce == 3 )if ( timer > 1.5 ) EnablePlayerControls ForceGreeting Set doOnce to 4endifendifEnd