I'm currently working on a script which will cause a Vertibird to fly over if the player enters the trigger, and once every 3 days it will fly on trigger. Here is the code, but it doesn't work in-game, any advice?
scn FEVTestBaseGenericVertibirdFlyoverSCRIPT; This trigger enables it's linked ref (a vertibird) and calls its forward animationfloat timershort FlyDayshort CurrentDayshort doOnceshort doOnce2ref linkedRef;****************************************Begin onTriggerEnter Player if (doOnce == 0) if (doOnce2 == 0) set CurrentDay to GameDaysPassed set doOnce2 to 1 endif set linkedRef to getLinkedRef linkedRef.enable 0 set timer to 1 set doOnce to 1 endif if (FlyDay >= CurrentDay + 3 && DoOnce == 3) linkedRef.enable 0 linkedRef.MoveTo FEVTestBaseVertibirdFlyoverResetREF set timer to 1 set doOnce to 1 set CurrentDay to GameDaysPassed endifEnd;*****************************************Begin gameMode if (doOnce == 1) if (timer <= 0) linkedRef.playgroup Forward 1 set doOnce to 2 else set timer to timer - GetSecondsPassed endif elseif (doOnce == 2) if (linkedRef.isAnimPlaying Forward == 0) linkedRef.disable ;disable the vertibird when it's done playing its forward animation set doOnce to 3 endif endif if (doOnce == 3) set FlyDay to GameDaysPassed endifEnd
