Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3919


Ignore:
Timestamp:
Jun 28, 2006, 4:55:19 PM (18 years ago)
Author:
snellen
Message:
 
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
     2panic = false             -- True if thestranger panics.
     3walkingRouteOne = false   -- True if thestranger is walking route one
     4
     5
     6function togglePanic(timestep)
     7panic = not panic
     8return false
     9end
     10
     11
     12function walkRouteOne()
     13
     14
     15end
     16
     17function flee()
     18
     19
     20end
     21
    322
    423function tick(timestep)
    524
    6 if not timeset then
    7 thestranger:setTime(5)
    8 timeset = true
     25if not walkingRouteOne then
     26walkRouteOne()
     27routeOneTriggered = true
    928end
    1029
    11 if not targetReached then
    12 distance = thestranger:walkTo(288,19,208)
     30if panic then
     31flee(timestep)
    1332end
    14 
    15 if distance == 0 then
    16 thestranger:turnTo(-1.57,0,1,0)
    17 targetReached = true
    18 end
    19 --io.write("distance is now ",distance,"\n")
    2033
    2134
Note: See TracChangeset for help on using the changeset viewer.