Can I just say you have just done EXACTLY something I wanted to do so badly in my own mod that I absolutely have to hijack that script, Willie?
However, it would appear that I am having problems with the collision for my elevator model not updating when the script is triggered, as every time I try to get on, I simply fall through the floor until I reach the original position of the model.
I only need a snippet of the original script, as I only need for the elevator to move up, however, the major difference between yours and mine at this point is that it is being activated with a switch, rather than by the player directly.
scn TKLeverBridgeRaiseScript2
float curpos
float endpos
short vatorStatus
begin onactivate
if vatorStatus == 0
set endpos to getpos z + 832
set vatorStatus to 1
message "Going Up!"
endif
end
begin gamemode
if vatorStatus == 1
set curpos to getpos z
if (curpos < endpos)
;MOVING LIFT UP
set curpos to curpos + (GetSecondsPassed * 30)
setpos z curpos
else
;FINAL UP POSITION - SET EXACT Z
set vatorStatus to 2
setpos z -128
endif
endif
end
If need be, I can workaround by adding this snippet at the end:
if getpos z == -128
If togglevar == 0
disable
set togglevar to 1
elseif togglevar == 1
reset3dstate
set togglevar to 2
elseif togglevar == 2
enable
set togglevar to 3
endif
endif
But, of course, that will cause the bridge piece to flicker on screen, and I'd like to avoid that if possible. What happens in between the activation and the finish is unimportant, as the player is not intended to be on the platforms when they are ascending.