Added first checkpoint. Closes #3.
This commit is contained in:
parent
a1de7e5231
commit
48d9f173f3
@ -13053,6 +13053,22 @@
|
|||||||
<toChangeIdBlue>105</toChangeIdBlue>
|
<toChangeIdBlue>105</toChangeIdBlue>
|
||||||
<toChangeObjNum>0</toChangeObjNum>
|
<toChangeObjNum>0</toChangeObjNum>
|
||||||
</trigger>
|
</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>
|
||||||
|
|
||||||
<composition>
|
<composition>
|
||||||
|
15
data/levels/scripts/firstCheckpoint.lua
Normal file
15
data/levels/scripts/firstCheckpoint.lua
Normal 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
|
@ -10,6 +10,7 @@ function trigger(objectToChange)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if(global.triggeredFristCheckpoint == true) then
|
||||||
if(global.triggeredOpenFirstDoor == true) then
|
if(global.triggeredOpenFirstDoor == true) then
|
||||||
if(global.openedSecondDoor == true) then
|
if(global.openedSecondDoor == true) then
|
||||||
if(global.triggeredOpenThirdDoor == true) then
|
if(global.triggeredOpenThirdDoor == true) then
|
||||||
@ -20,6 +21,9 @@ function trigger(objectToChange)
|
|||||||
else
|
else
|
||||||
level:movePlayer(17.5,21.0,87.0)
|
level:movePlayer(17.5,21.0,87.0)
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
level:movePlayer(18.0, 23.0, 145.0)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
level:resetPlayer()
|
level:resetPlayer()
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user