Changeset 4080 for data/trunk/scripts/falldown.lua
- Timestamp:
- Jul 4, 2006, 12:55:44 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
data/trunk/scripts/falldown.lua
r3991 r4080 1 -- Get objects from orxonox 2 thisscript:addObject("TestEntity", "fallingguy") 3 thisscript:addObject("FPSPlayer", "Player") 4 1 5 dy = 0 2 6 randTime = 0 … … 9 13 math.randomseed(os.clock()) 10 14 randinit = true 11 randTime = 10* math.random()15 randTime = 8 * math.random() 12 16 end 13 17 end … … 15 19 16 20 function fallDown(timestep) 17 dy = dy + timestep *0.0121 dy = dy + timestep 18 22 thisX = fallingguy:getAbsCoorX() 19 23 thisY = fallingguy:getAbsCoorY() … … 22 26 fallingguy:setAbsCoor(thisX, thisY - dy, thisZ) 23 27 24 if thisY < 0 then28 if thisY < -100 then 25 29 eventFinished = true 26 30 end
Note: See TracChangeset
for help on using the changeset viewer.