- Timestamp:
- Jun 28, 2006, 4:55:19 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
data/branches/single_player_map/scripts/thestranger.lua
r3914 r3919 1 timeset = false 2 targetReached = false 1 -- Global Variables 2 panic = false -- True if thestranger panics. 3 walkingRouteOne = false -- True if thestranger is walking route one 4 5 6 function togglePanic(timestep) 7 panic = not panic 8 return false 9 end 10 11 12 function walkRouteOne() 13 14 15 end 16 17 function flee() 18 19 20 end 21 3 22 4 23 function tick(timestep) 5 24 6 if not timesetthen7 thestranger:setTime(5)8 timeset= true25 if not walkingRouteOne then 26 walkRouteOne() 27 routeOneTriggered = true 9 28 end 10 29 11 if not targetReachedthen12 distance = thestranger:walkTo(288,19,208)30 if panic then 31 flee(timestep) 13 32 end 14 15 if distance == 0 then16 thestranger:turnTo(-1.57,0,1,0)17 targetReached = true18 end19 --io.write("distance is now ",distance,"\n")20 33 21 34
Note: See TracChangeset
for help on using the changeset viewer.