tower defence level problem

L

leon_in_hk

Guest
i was making a td map, and i made the first three level already, but then when i test it , after lvl 1 is lvl 2, and after lvl 2 it begin another lvl 2!
---------------------------------
my trigger for level 2:
event:when (player 12's food used lesser or equal to 0)
condition:none
action:create (last started timer) with title :level 2 begins in...:
start (last started timer ) as a one shot timer for 20 sec
wait 20.oo sec
create 15 ghoul in center of (region 0)
destroy last created timer
create text for 20 sec ( level 2: ghouls)
-----------------------------------
my trigger for level 3:

event:when (player 12's food used lesser or equal to 0)
condition:none
action:create (last started timer) with title :level 3 begins in...:
start (last started timer ) as a one shot timer for 20 sec
wait 20.oo sec
create 15 abonmination in center of (region 0)
destroy last created timer
create text for 20 sec ( level 3: abonmination)
-------------------------------------
anyone know why will it repeat level 2??? :banghead:
 

Robotexual

New Member
Reaction score
3
leon_in_hk said:
i was making a td map, and i made the first three level already, but then when i test it , after lvl 1 is lvl 2, and after lvl 2 it begin another lvl 2!
---------------------------------
my trigger for level 2:
event:when (player 12's food used lesser or equal to 0)
condition:none
action:create (last started timer) with title :level 2 begins in...:
start (last started timer ) as a one shot timer for 20 sec
wait 20.oo sec
create 15 ghoul in center of (region 0)
destroy last created timer
create text for 20 sec ( level 2: ghouls)
-----------------------------------
my trigger for level 3:

event:when (player 12's food used lesser or equal to 0)
condition:none
action:create (last started timer) with title :level 3 begins in...:
start (last started timer ) as a one shot timer for 20 sec
wait 20.oo sec
create 15 abonmination in center of (region 0)
destroy last created timer
create text for 20 sec ( level 3: abonmination)
-------------------------------------
anyone know why will it repeat level 2??? :banghead:
Yep - event:when (player 12's food used lesser or equal to 0)
That part I believe.
 
S

ShaiTan-Enk

Guest
No, that has nothing to do with it. The problem is that you have essentially the same trigger twice. What happens is the game calls both triggers, but since the trigger for level 2 is ahead of the trigger for level 3, it gets called first and overloads the trigger for level 3. Essentially, the game never reaches the trigger for level 3. What you need to do is add a little line at the end of trigger 2 that says "Trigger - turn off (This trigger)".

And what I would suggest doing is going to the free trigger code section and looking at DeatH tD because it uses a much more compact level changing system. (Only three triggers for unlimited levels if you discount the solo triggers). I can't remember if in that version of DeatH tD it uses the food gets set to 0 event, but if it does then that part will be under Runners/Attackers/whatever it's called, you know what I mean, whereas the rest of the run triggers are under Game Play.
 

Jazradel

Helping people do more by doing less.
Reaction score
102
Yep it is to do with Events. It runs both triggers at the same time and Level 2 Overides. Create a intereger and use a conditions that checks it level then increase in actions.
 

xPheRe

New Member
Reaction score
43
You may start setting off the triggers related to levels higher than 2.
Then in every level, deactivate the current trigger and activate the next.
Code:
Level2
Event
    Player 12 food equals 0
Conditions
    None
Actions
    Turn this trigger Off
    (Create units and do some stuff for level 2...)
    Turn Level3 trigger On
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top