I am tearing my hair out over this script - but it's just not working. If someone can fix it/write a new one from scratch I would much appricate it.
The script essentailly is designed that when the palyer steps on the activator ( a floor/platform) it moves downwards but its not working . Nothing happens at all.
Begin sm_GN_Falmer_PitBlock_Script
short PlatformMoving
Float timer
Float PitTimer
If ( CellChanged == 1 )
Set PlatformMoving to 100
Endif
If ( PlatformMoving == 0 )
If ( GetStandingPC == 1 ) ; PC Activate
Messagebox "the trap works?"
Set PitTimer to ( PitTimer + getsecondspassed )
If ( PitTimer >= .3 )
Set PlatformMoving to 1
EndIf
ElseIf ( GetStandingActor == 1 ) ; NPC/AI Activate
Set PitTimer to ( PitTimer + getsecondspassed )
If ( PitTimer >= .3 )
Set PlatformMoving to 1
EndIf
Else
Return
Endif
Endif
If ( PlatformMoving == 100 )
Set timer to 0
"sm_GN_Falmer_Pit_Block"->SetAtStart
Set PlatformMoving to 0
Elseif ( PlatformMoving == 1 )
Set timer to ( timer + getsecondspassed )
If ( timer <= .5 )
"sm_GN_Falmer_Pit_Block"->MoveWorld z -1090 ; Block moves down fast
Else
Set timer to 0
Set PlatformMoving to 2
Endif
Elseif ( PlatformMoving == 2 )
Set timer to ( timer + getsecondspassed )
If ( timer <= 7 ) ; Wait before moving again
Return
Else
Set timer to 0
Set PlatformMoving to 3
Endif
Elseif ( PlatformMoving == 3 )
Set timer to ( timer + getsecondspassed )
If ( timer <= 3 )
"sm_GN_Falmer_Pit_Block"->MoveWorld z 181 ; Moves up slowly
Else
Set timer to 0
Set PlatformMoving to 4
"sm_GN_Falmer_Pit_Block"->SetAtStart
Endif
Elseif ( PlatformMoving == 4 )
Set timer to ( timer + getsecondspassed )
If ( timer >= 5 ) ; Give 5 second reset
Set timer to 0
Set PitTimer to 0
Set PlatformMoving to 0
Endif
Endif
End
short PlatformMoving
Float timer
Float PitTimer
If ( CellChanged == 1 )
Set PlatformMoving to 100
Endif
If ( PlatformMoving == 0 )
If ( GetStandingPC == 1 ) ; PC Activate
Messagebox "the trap works?"
Set PitTimer to ( PitTimer + getsecondspassed )
If ( PitTimer >= .3 )
Set PlatformMoving to 1
EndIf
ElseIf ( GetStandingActor == 1 ) ; NPC/AI Activate
Set PitTimer to ( PitTimer + getsecondspassed )
If ( PitTimer >= .3 )
Set PlatformMoving to 1
EndIf
Else
Return
Endif
Endif
If ( PlatformMoving == 100 )
Set timer to 0
"sm_GN_Falmer_Pit_Block"->SetAtStart
Set PlatformMoving to 0
Elseif ( PlatformMoving == 1 )
Set timer to ( timer + getsecondspassed )
If ( timer <= .5 )
"sm_GN_Falmer_Pit_Block"->MoveWorld z -1090 ; Block moves down fast
Else
Set timer to 0
Set PlatformMoving to 2
Endif
Elseif ( PlatformMoving == 2 )
Set timer to ( timer + getsecondspassed )
If ( timer <= 7 ) ; Wait before moving again
Return
Else
Set timer to 0
Set PlatformMoving to 3
Endif
Elseif ( PlatformMoving == 3 )
Set timer to ( timer + getsecondspassed )
If ( timer <= 3 )
"sm_GN_Falmer_Pit_Block"->MoveWorld z 181 ; Moves up slowly
Else
Set timer to 0
Set PlatformMoving to 4
"sm_GN_Falmer_Pit_Block"->SetAtStart
Endif
Elseif ( PlatformMoving == 4 )
Set timer to ( timer + getsecondspassed )
If ( timer >= 5 ) ; Give 5 second reset
Set timer to 0
Set PitTimer to 0
Set PlatformMoving to 0
Endif
Endif
End