we can go to level 2 now!
[dd2d.git] / data / scripts / switch / exit.dacs
blobe57fa5bbbaec384c5719a694d81742e00f1a2c13
1 module switchExit is "switch" "Exit";
3 import apiActor;
4 import apiMap;
5 import apiSwitch;
6 import stdlib;
9 // setup actor properties
10 public void initialize (Actor me) {
14 // thinker
15 public void think (Actor me) {
16   if (me.atm > 0) {
17     --me.atm;
18     return;
19   }
21   me.atm = 0; // just in case
23   auto toucher = me.switchWhoTouched();
24   if (toucher && toucher.isPlayer) {
25     me.atm = 9; // cooldown time
26     gactLevelExit(me.switchGetD());
27   }