I though that scripts in morrowind ran every frame......however this script i have seems ot stop after it has run once....any ideas?
It is on the Dwemer Shock Centerion you get during the telvanni questline, Im just trying ot make it into a proper companion everything seems ot work.....but then this problem suddenly came up which seems to stop the script dead. The script runs fine, right up till the first time it runs through the if state == -1 part.....then it will run once and stop......the testing messagebox i put in will appear when i load into the same cell as the centurion.....but after that nothing in the script ever runs again.
Begin baladasCenturion;makes the centurion pop out of Arvs Drelen;because of Velothi collision issuesshort stateshort p_speedshort Companionshort levitated float myxfloat myyfloat myzfloat timerif ( state > -1 ) if ( GetJournalIndex HT_DahrkMezalf < 10 ) ;if quest has not yet started, stop return endif if ( CellChanged == 0 ) ;only pop on cellchange return endif if ( GetJournalIndex HT_DahrkMezalf < 100 ) PositionCell -87017 95351 1226 283 "GnisWis" Disable endif if ( GetJournalIndex HT_DahrkMezalf >= 100 ) AiFollow Player 0 0 0 0 Set state to -1 Enable AddTopic Follow AddTopic Wait Set Companion to 1 endifelseif ( state == -1 ) ; ENABLES COMPANION SHARE OPTION ; Used along with "short companion" (above). set myx to ( Player->GetPos x ) set myy to ( Player->GetPos y ) set myz to ( Player->GetPos z ) messagebox "Testing" "okay" ; WARPING TO PLAYER ( Used to improve "following" ability) if ( GetCurrentAiPackage == 3 ) if ( GetWeaponDrawn == 1 ) return elseif ( GetSpellReadied == 1 ) return elseif ( GetDistance Player > 800 ) messagebox "800 away" set timer to timer + GetSecondsPassed if ( timer > 8 ) set timer to 0 SetPos x myx SetPos y myy SetPos z myz endif endif endif ; LEVITATION if ( Player->GetEffect, sEffectLevitate == 1 && levitated == 0 ) if ( GetEffect, sEffectLevitate == 0 ) AIWander 0 0 0 0 set levitated to 1 endif endif if ( Player->GetEffect, sEffectLevitate == 0 && levitated == 1 ) if ( GetCurrentAiPackage == 0 ) AIFollow Player 0 0 0 0 set levitated to 0 endif endifendif;if ( GetDeadCount "centurion_shock_baladas" > 0 ); if ( getitemcount ingred_scrap_metal_01 > 2 ); removeitem ingred_scrap_metal_01 2; resurrect; if ( state == -1 ); AiFollow Player 0 0 0 0 ; endif; endif;endifEnd baladasCenturion