
gamevar SANDAMOUNT 2 0
gamevar SANDPALETTE 15 0
gamevar SNOWPALETTE 12 0
gamevar GRASSPALETTE 14 0
gamevar SANDSHADE 0 2
gamevar FOOTSTEPCOUNTER 0 1

gamevar CANTRELOAD 0 1
gamevar RELOADTIMER 0 1
gamevar DUCKSWITCH 0 2
gamevar ELECTRICITYBURST 0 1
gamevar ISCLIMBING 0 1
gamevar FLOORTEXT 0 2
gamevar SKILL 0 1
gamevar SPRINTCOUNTER 0 2
gamevar FOOTPRINTCOUNT 0 1
gamevar STARTRUNNING 0 1
gamevar STARTSHOOTING 0 1
gamevar DNC0 0 0

state STONESTEP // 200, 336, 2080

ifp prunning { ifvare FOOTSTEPCOUNTER 9 { ifrnd 256 { sound ASTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound ASTEP2 setvar FOOTSTEPCOUNTER 0 } } }
ifp pwalking { ifvare FOOTSTEPCOUNTER 15 { ifrnd 196 { sound ASTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound ASTEP2 setvar FOOTSTEPCOUNTER 0 } } }
ifp prunningback { ifvare FOOTSTEPCOUNTER 9 { ifrnd 256 { sound ASTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound ASTEP2 setvar FOOTSTEPCOUNTER 0 } } }
ifp pwalkingback { ifvare FOOTSTEPCOUNTER 15 { ifrnd 196 { sound ASTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound ASTEP2 setvar FOOTSTEPCOUNTER 0 } } }


ends





state METALSTEP // 200, 336, 2080

ifp prunning { ifvare FOOTSTEPCOUNTER 9 { ifrnd 256 { sound AMETALSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound AMETALSTEP2 setvar FOOTSTEPCOUNTER 0 } } }
ifp pwalking { ifvare FOOTSTEPCOUNTER 15 { ifrnd 196 { sound AMETALSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound AMETALSTEP2 setvar FOOTSTEPCOUNTER 0 } } }
ifp prunningback { ifvare FOOTSTEPCOUNTER 9 { ifrnd 256 { sound AMETALSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound AMETALSTEP2 setvar FOOTSTEPCOUNTER 0 } } }
ifp pwalkingback { ifvare FOOTSTEPCOUNTER 15 { ifrnd 196 { sound AMETALSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound AMETALSTEP2 setvar FOOTSTEPCOUNTER 0 } } }

ends


state WATERSTEP // 200, 336, 2080

ifp prunning { ifvare FOOTSTEPCOUNTER 9 { ifrnd 256 { sound AWATERSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound AWATERSTEP2 setvar FOOTSTEPCOUNTER 0 } } }
ifp pwalking { ifvare FOOTSTEPCOUNTER 15 { ifrnd 196 { sound AWATERSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound AWATERSTEP2 setvar FOOTSTEPCOUNTER 0 } } }
ifp prunningback { ifvare FOOTSTEPCOUNTER 9 { ifrnd 256 { sound AWATERSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound AWATERSTEP2 setvar FOOTSTEPCOUNTER 0 } } }
ifp pwalkingback { ifvare FOOTSTEPCOUNTER 15 { ifrnd 196 { sound AWATERSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound AWATERSTEP2 setvar FOOTSTEPCOUNTER 0 } } }

ends

state CARPETSTEP // 200, 336, 2080

ifp prunning { ifvare FOOTSTEPCOUNTER 9 { ifrnd 256 { sound ACARPETSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound ACARPETSTEP2 setvar FOOTSTEPCOUNTER 0 } } }
ifp pwalking { ifvare FOOTSTEPCOUNTER 15 { ifrnd 196 { sound ACARPETSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound ACARPETSTEP2 setvar FOOTSTEPCOUNTER 0 } } }
ifp prunningback { ifvare FOOTSTEPCOUNTER 9 { ifrnd 256 { sound ACARPETSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound ACARPETSTEP2 setvar FOOTSTEPCOUNTER 0 } } }
ifp pwalkingback { ifvare FOOTSTEPCOUNTER 15 { ifrnd 196 { sound ACARPETSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound ACARPETSTEP2 setvar FOOTSTEPCOUNTER 0 } } }

ends

state PLASTISTEP // 200, 336, 2080

ifp prunning { ifvare FOOTSTEPCOUNTER 9 { ifrnd 256 { sound APLASTICSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound APLASTICSTEP2 setvar FOOTSTEPCOUNTER 0 } } }
ifp pwalking { ifvare FOOTSTEPCOUNTER 15 { ifrnd 196 { sound APLASTICSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound APLASTICSTEP2 setvar FOOTSTEPCOUNTER 0 } } }
ifp prunningback { ifvare FOOTSTEPCOUNTER 9 { ifrnd 256 { sound APLASTICSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound APLASTICSTEP2 setvar FOOTSTEPCOUNTER 0 } } }
ifp pwalkingback { ifvare FOOTSTEPCOUNTER 15 { ifrnd 196 { sound APLASTICSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound APLASTICSTEP2 setvar FOOTSTEPCOUNTER 0 } } }

ends



state TERRASTEP // 200, 336, 2080

ifp prunning { ifvare FOOTSTEPCOUNTER 9 { ifrnd 256 { sound ATERRAINSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound ATERRAINSTEP2 setvar FOOTSTEPCOUNTER 0 } } }
ifp pwalking { ifvare FOOTSTEPCOUNTER 15 { ifrnd 196 { sound ATERRAINSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound ATERRAINSTEP2 setvar FOOTSTEPCOUNTER 0 } } }
ifp prunningback { ifvare FOOTSTEPCOUNTER 9 { ifrnd 256 { sound ATERRAINSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound ATERRAINSTEP2 setvar FOOTSTEPCOUNTER 0 } } }
ifp pwalkingback { ifvare FOOTSTEPCOUNTER 15 { ifrnd 196 { sound ATERRAINSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound ATERRAINSTEP2 setvar FOOTSTEPCOUNTER 0 } } }

ends


state WADESTEP // 200, 336, 2080

ifp prunning { ifvare FOOTSTEPCOUNTER 9 { ifrnd 256 { sound AWADESTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound AWADESTEP2 setvar FOOTSTEPCOUNTER 0 } } }
ifp pwalking { ifvare FOOTSTEPCOUNTER 15 { ifrnd 196 { sound AWADESTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound AWADESTEP2 setvar FOOTSTEPCOUNTER 0 } } }
ifp prunningback { ifvare FOOTSTEPCOUNTER 9 { ifrnd 256 { sound AWADESTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound AWADESTEP2 setvar FOOTSTEPCOUNTER 0 } } }
ifp pwalkingback { ifvare FOOTSTEPCOUNTER 15 { ifrnd 196 { sound AWADESTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound AWADESTEP2 setvar FOOTSTEPCOUNTER 0 } } }

ends


state WOODSTEP // 200, 336, 2080

ifp prunning { ifvare FOOTSTEPCOUNTER 9 { ifrnd 256 { sound AWOODSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound AWOODSTEP2 setvar FOOTSTEPCOUNTER 0 } } }
ifp pwalking { ifvare FOOTSTEPCOUNTER 15 { ifrnd 196 { sound AWOODSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound AWOODSTEP2 setvar FOOTSTEPCOUNTER 0 } } }
ifp prunningback { ifvare FOOTSTEPCOUNTER 9 { ifrnd 256 { sound AWOODSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound AWOODSTEP2 setvar FOOTSTEPCOUNTER 0 } } }
ifp pwalkingback { ifvare FOOTSTEPCOUNTER 15 { ifrnd 196 { sound AWOODSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound AWOODSTEP2 setvar FOOTSTEPCOUNTER 0 } } }

ends

state GLASSSTEP // 200, 336, 2080

ifp prunning { ifvare FOOTSTEPCOUNTER 9 { ifrnd 256 { sound AGLASSSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound AGLASSSTEP2 setvar FOOTSTEPCOUNTER 0 } } }
ifp pwalking { ifvare FOOTSTEPCOUNTER 15 { ifrnd 196 { sound AGLASSSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound AGLASSSTEP2 setvar FOOTSTEPCOUNTER 0 } } }
ifp prunningback { ifvare FOOTSTEPCOUNTER 9 { ifrnd 256 { sound AGLASSSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound AGLASSSTEP2 setvar FOOTSTEPCOUNTER 0 } } }
ifp pwalkingback { ifvare FOOTSTEPCOUNTER 15 { ifrnd 196 { sound AGLASSSTEP1 setvar FOOTSTEPCOUNTER 0 } else { sound AGLASSSTEP2 setvar FOOTSTEPCOUNTER 0 } } }

ends

state getstep
// gettexturefloor
getsector[THISACTOR].floorpicnum FLOORTEXT
ifvare FLOORTEXT 70 state WOODSTEP
else ifvare FLOORTEXT 126 state GLASSSTEP
else ifvare FLOORTEXT 127 state GLASSSTEP
else ifvare FLOORTEXT 128 state GLASSSTEP
else ifvare FLOORTEXT 191 state PLASTISTEP
else ifvare FLOORTEXT 198 state GLASSSTEP
else ifvare FLOORTEXT 200 state WATERSTEP
else ifvare FLOORTEXT 203 state PLASTISTEP
else ifvare FLOORTEXT 238 state TERRASTEP
else ifvare FLOORTEXT 239 state TERRASTEP
else ifvare FLOORTEXT 240 state TERRASTEP
else ifvare FLOORTEXT 310 state PLASTISTEP
else ifvare FLOORTEXT 311 state PLASTISTEP
else ifvare FLOORTEXT 318 state PLASTISTEP
else ifvare FLOORTEXT 332 state GLASSSTEP
else ifvare FLOORTEXT 336 state WATERSTEP
else ifvare FLOORTEXT 339 state PLASTISTEP
else ifvare FLOORTEXT 344 state PLASTISTEP
else ifvare FLOORTEXT 369 state PLASTISTEP
else ifvare FLOORTEXT 370 state WOODSTEP
else ifvare FLOORTEXT 371 state METALSTEP
else ifvare FLOORTEXT 378 state PLASTISTEP
else ifvare FLOORTEXT 390 state PLASTISTEP
else ifvare FLOORTEXT 392 state WOODSTEP
else ifvare FLOORTEXT 395 state PLASTISTEP
else ifvare FLOORTEXT 396 state PLASTISTEP
else ifvare FLOORTEXT 401 state GLASSSTEP
else ifvare FLOORTEXT 414 state GLASSSTEP
else ifvare FLOORTEXT 425 state GLASSSTEP
else ifvare FLOORTEXT 426 state GLASSSTEP
else ifvare FLOORTEXT 427 state GLASSSTEP
else ifvare FLOORTEXT 428 state GLASSSTEP
else ifvare FLOORTEXT 440 state CARPETSTEP
else ifvare FLOORTEXT 444 state PLASTISTEP
else ifvare FLOORTEXT 454 state PLASTISTEP
else ifvare FLOORTEXT 478 state TERRASTEP
else ifvare FLOORTEXT 503 state GLASSSTEP
else ifvare FLOORTEXT 504 state GLASSSTEP
else ifvare FLOORTEXT 545 state CARPETSTEP
else ifvare FLOORTEXT 575 state GLASSSTEP
else ifvare FLOORTEXT 576 state WOODSTEP
else ifvare FLOORTEXT 626 state PLASTISTEP
else ifvare FLOORTEXT 698 state PLASTISTEP
else ifvare FLOORTEXT 720 state GLASSSTEP
else ifvare FLOORTEXT 726 state PLASTISTEP
else ifvare FLOORTEXT 727 state WOODSTEP
else ifvare FLOORTEXT 735 state WOODSTEP
else ifvare FLOORTEXT 742 state WOODSTEP
else ifvare FLOORTEXT 745 state WOODSTEP
else ifvare FLOORTEXT 746 state WOODSTEP
else ifvare FLOORTEXT 749 state WOODSTEP
else ifvare FLOORTEXT 758 state GLASSSTEP
else ifvare FLOORTEXT 770 state TERRASTEP
else ifvare FLOORTEXT 771 {
                         state CARPETSTEP
                         getsector[THISACTOR].floorshade SANDSHADE
                         setplayer[THISACTOR].footprintcount SANDAMOUNT
                         setplayer[THISACTOR].footprintshade SANDSHADE
                         setplayer[THISACTOR].footprintpal SANDPALETTE
                         }
else ifvare FLOORTEXT 780 state TERRASTEP
else ifvare FLOORTEXT 781 state TERRASTEP
else ifvare FLOORTEXT 782 state TERRASTEP
else ifvare FLOORTEXT 786 state CARPETSTEP
else ifvare FLOORTEXT 796 state TERRASTEP
else ifvare FLOORTEXT 800 state TERRASTEP
else ifvare FLOORTEXT 803 state CARPETSTEP  // grass
else ifvare FLOORTEXT 805 state TERRASTEP
else ifvare FLOORTEXT 811 state GLASSSTEP
else ifvare FLOORTEXT 812 state TERRASTEP
else ifvare FLOORTEXT 852 state TERRASTEP
else ifvare FLOORTEXT 857 state GLASSSTEP
else ifvare FLOORTEXT 877 state PLASTISTEP
else ifvare FLOORTEXT 879 state WOODSTEP
else ifvare FLOORTEXT 880 state WOODSTEP
else ifvare FLOORTEXT 884 state WOODSTEP
else ifvare FLOORTEXT 885 state WOODSTEP
else ifvare FLOORTEXT 889 state WADESTEP
else ifvare FLOORTEXT 893 state TERRASTEP
else ifvare FLOORTEXT 897 state WOODSTEP
else ifvare FLOORTEXT 898 state CARPETSTEP
else ifvare FLOORTEXT 899 state CARPETSTEP
else ifvare FLOORTEXT 900 state CARPETSTEP
else ifvare FLOORTEXT 1082 state WADESTEP
else ifvare FLOORTEXT 1169 state TERRASTEP
else ifvare FLOORTEXT 1170 state TERRASTEP
else ifvare FLOORTEXT 1188 state WOODSTEP
else ifvare FLOORTEXT 1189 state WOODSTEP
else ifvare FLOORTEXT 1205 state GLASSSTEP
else ifvare FLOORTEXT 1218 state CARPETSTEP
else ifvare FLOORTEXT 1219 state CARPETSTEP
else ifvare FLOORTEXT 1849 state WOODSTEP
else ifvare FLOORTEXT 2080 state WATERSTEP
else ifvare FLOORTEXT 2922 state WOODSTEP
else ifvare FLOORTEXT 3392 state TERRASTEP
else ifvare FLOORTEXT 3401 state TERRASTEP
else ifvare FLOORTEXT 3402 state TERRASTEP
else ifvare FLOORTEXT 3403 state TERRASTEP
else ifvare FLOORTEXT 3595 state TERRASTEP
else ifvare FLOORTEXT 3596  {
                         state CARPETSTEP
                         getsector[THISACTOR].floorshade SANDSHADE
                         setplayer[THISACTOR].footprintcount SANDAMOUNT
                         setplayer[THISACTOR].footprintshade SANDSHADE
                         setplayer[THISACTOR].footprintpal SNOWPALETTE
                         }
else ifvare FLOORTEXT 3602 state PLASTISTEP  
else ifvare FLOORTEXT 3603 state PLASTISTEP  
else ifvare FLOORTEXT 3642  {
                         state CARPETSTEP
                         getsector[THISACTOR].floorshade SANDSHADE
                         setplayer[THISACTOR].footprintcount SANDAMOUNT
                         setplayer[THISACTOR].footprintshade SANDSHADE
                         setplayer[THISACTOR].footprintpal SNOWPALETTE
                         }

else state STONESTEP
ends
