Back to my old problem with TD

xKxIxNxGx

New Member
Reaction score
3
ok, i did what i was told to do before which i will post anyways just to double check if i did it right. MY problem is that in lvl 1 they spawn but it doesnt switch to lvl 2... im so confused what to do...

the trigger just to double check...
Code:
levels
    Events
        Time - SpawnTimer expires
    Conditions
    Actions
        Set level_units[1] = Spider
        Set level_units[2] = Timber Wolf
        Set level_units[3] = Dark Troll Trapper
        For each (Integer A) from 1 to 51, do (Actions)
            Loop - Actions
                Wait 1.00 seconds
                Unit - Create 1 level_units[level] for Player 2 (Blue) at (Center of Region 000 <gen>) facing Default building facing degrees
                Unit - Create 1 level_units[level] for Player 2 (Blue) at (Center of Region 012 <gen>) facing Default building facing degrees

now what trigger i think messed up...
Code:
round1
    Events
        Game - numberunits becomes Equal to 0.00
    Conditions
    Actions
        Game - Display to Player Group - Player 1 (Red) the text: (Congradulations for completing Level  + (String(level)))
        Player - Add ((level x 5) x 5) to Player 1 (Red) Current gold
        Set level = (level + 1)
        Game - Display to Player Group - Player 1 (Red) the text: The next round will...
        Countdown Timer - Start SpawnTimer as a One-shot timer that will expire in 30.00 seconds

the variable numberunits is set as
Code:
Set numberunits = (Real((Player 2 (Blue) Food used)))
 

Duwenbasden

Ver 6 CREATE energy AS SELECT * FROM u.energy
Reaction score
165
>numberunits becomes Equal to 0.00

You cannot "equal" real numbers (double(something) == 0.00 will always = false). Use integers (have no idea why you use real in the first place)
 

xKxIxNxGx

New Member
Reaction score
3
i did this so when player blue has no more units it would start and do the actions i wanted.. and it worked before i think.. i dont remember..
also you cant use intigers for event commands.. only real, thats why i used real
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
You see, you used Value of real variable under game events. You should use

Code:
Events
    [COLOR="Red"]Player[/COLOR] - Player 2 (Blue)'s Food used becomes Equal to 0.00
 

chovynz

We are all noobs! in different states of Noobism!
Reaction score
130
I think you can also use this on an Integer field:
Conversion - Real to Integer
 
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