I currently have a script, but I wan't certain parts of the script to only run after a certain number of seconds. The script begins when the player enters a trigger, and is running up until the player has the leg crippled (Player.DamageAV LeftMobilityCondition 100). However after this, the script seems to stop, and the players controls aren't enabled again.
If anyone knows the cause of this, and how to fix it, it would be appreciated. Also any general advice on how to 'clean up' the script, since I don't have much scripting experience I might be using longwinded methods etc. (Though keep in mind I don't want to have NVSE as a requirement)
Here is the script:
SCN TVNellisBoxCarEntranceScript Float Timer Short DoOnce Short Entered Begin OnTriggerEnter Player If Entered == 0 Set Entered to 1 Endif End Begin Gamemode If Entered == 1 If Timer < 5 Set Timer to Timer + GetSecondsPassed If DoOnce == 0 DisablePlayerControls 1 1 1 1 0 1 1 Imod TVNellisBoxCarEntrance01Imod Playsound TVNellisBoxcarEntrance01Sound Set DoOnce to 1 Endif Elseif Timer >= 5 && Timer < 11 Set Timer to Timer + GetSecondsPassed If DoOnce == 1 Player.Moveto TVNellisCaveBoxCarEntranceMarkerREF TVNellisBoxcarEntranceREF.MarkForDelete TVNellisBoxcarEntranceDoorREF.MarkForDelete TVNellisBoxCarSunkenREF.Enable Imod TVNellisBoxCarEntrance02Imod Playsound TVNellisBoxcarEntrance02Sound Player.DamageAV LeftMobilityCondition 100 Set DoOnce to 2 Endif Elseif Timer >= 11 Set Timer to Timer + GetSecondsPassed If DoOnce == 2 EnablePlayerControls TVNellisBoxCarEntranceTriggerREF.Disable TVNellisBoxCarEntranceTriggerREF.MarkForDelete Set DoOnce to 3 Set Entered to 2 Endif Endif Endif End
Thanks in advance, BayK.