Created
March 7, 2016 21:22
-
-
Save drage0/513eebf2a8516c62678c to your computer and use it in GitHub Desktop.
Lua program that defines the first level
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ Opens and closes the doors. | |
'id' is the indentifier, | |
starting from 0 as | |
the first one. | |
'status' "ture" or "false" | |
Defines should the door | |
be open --]] | |
function doorTrigger(id, status) | |
animation = "Open"; | |
if (status == false) then animation = "Close"; end | |
if id == 0 then AMovers:PlayAnim(animation); end | |
if id == 1 then AMoversN:PlayAnim(animation); end | |
if id == 2 then AMovers2:PlayAnim(animation); end | |
end | |
--[[ WAVE 1 ]] | |
Wait(All(Events(Enemies.AllKilled))); | |
DA1:Recharge(); | |
Wait(Event(DA1.Activated)); | |
doorTrigger(0, true); -- AMovers:PlayAnim("Default") | |
--[[ WAVE 2 ]] | |
Wait(Event(DBS.Picked)); | |
Enemies2:SpawnMaintainGroup(); | |
Wait(All(Events(Enemies2.AllKilled))); | |
DAN:Recharge(); | |
Wait(Event(DAN.Activated)); | |
doorTrigger(1, true); -- AMoversN:PlayAnim("Default") | |
--[[ WAVE 3 ]] | |
Wait(Event(TMG.Picked)); | |
Enemies3:SpawnMaintainGroup(); | |
Wait(All(Events(Enemies3.AllKilled))); | |
DA2:Recharge(); | |
Wait(Event(DA2.Activated)); | |
doorTrigger(2, true); -- Amovers2:PlayAnim("Default") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment