Added first checkpoint. Closes #3.

This commit is contained in:
Faerbit 2015-03-15 18:33:12 +01:00
parent a1de7e5231
commit 48d9f173f3
3 changed files with 42 additions and 7 deletions

View File

@ -13053,6 +13053,22 @@
<toChangeIdBlue>105</toChangeIdBlue>
<toChangeObjNum>0</toChangeObjNum>
</trigger>
<trigger>
<name>firstCheckpoint</name>
<undo>false</undo>
<xPosition>-70</xPosition>
<yPosition>23</yPosition>
<zPosition>105</zPosition>
<targetIdGreen>-</targetIdGreen>
<targetIdBlue>-</targetIdBlue>
<distance>25</distance>
<isBiggerThan>false</isBiggerThan>
<objectNum>0</objectNum>
<luaScript>firstCheckpoint.lua</luaScript>
<toChangeIdGreen>0</toChangeIdGreen>
<toChangeIdBlue>105</toChangeIdBlue>
<toChangeObjNum>0</toChangeObjNum>
</trigger>
</composition>
<composition>

View File

@ -0,0 +1,15 @@
local global = require("global")
if(global.triggeredFristCheckpoint == nil) then
global.triggeredFristCheckpoint = false
end
function trigger(objectToChange)
if(global.triggeredFristCheckpoint == false) then
if(not level) then
print("No level found in Lua!")
return
end
global.triggeredFristCheckpoint = true
print("firstCheckpoint")
end
end

View File

@ -9,16 +9,20 @@ function trigger(objectToChange)
print("No level found in Lua!")
return
end
if(global.triggeredOpenFirstDoor == true) then
if(global.openedSecondDoor == true) then
if(global.triggeredOpenThirdDoor == true) then
level:movePlayer(-169.5,21.5,58.5)
if(global.triggeredFristCheckpoint == true) then
if(global.triggeredOpenFirstDoor == true) then
if(global.openedSecondDoor == true) then
if(global.triggeredOpenThirdDoor == true) then
level:movePlayer(-169.5,21.5,58.5)
else
level:movePlayer(-78.5,21.75,4.5)
end
else
level:movePlayer(-78.5,21.75,4.5)
level:movePlayer(17.5,21.0,87.0)
end
else
level:movePlayer(17.5,21.0,87.0)
level:movePlayer(18.0, 23.0, 145.0)
end
else
level:resetPlayer()