Need help with a New TD Idea

Dismembered

New Member
Reaction score
1
Ok hmm is there a way that allow me to show you my triggers ? so u can check them if everything looks ok....?
 

Dismembered

New Member
Reaction score
1
Action

Set Wave_unit_types[1] = |cffff0000Unarmored Frog|r |cff7777aa[1]|r
Set Wave_unit_types[2] = |cffff0000Heavy Armored Frog|r |cff7777aa[1]|r
Set Wave_unit_types[3] = |cffff0000Medium Armored Frog|r |cff7777aa[1]|r
Set Wave_unit_types[4] = |cffff0000Fortified Frog|r |cff7777aa[1]|r
Set Current_wave_type = Wave_unit_types[(((Level + 1) x 10) + (Random integer number between 1 and 4))]


I had to made new Variables :

Wave_unit_types is 1 variable Unit-type array
current_wave_type 1 variable unit-type non-array
 

Korolen

New User (Why do I keep getting those red bars?)
Reaction score
69
...

*sigh*

You initialize the unit-type array (looks like you've got strings...) Wave_Types at map initialization, and then, every time the wave changes,
Code:
Set Current_Wave_Type = Wave_Types[(((Current_Wave) x 10) + (Random Integer from 1 to 4))]

P.S. Please put your code in [CODE ] tags (the # when posting).
 

Dismembered

New Member
Reaction score
1
Can u tell me what s your variables and their '' fonction '' example...current_wave : unit-type array..!? i think thats the part i don'T understand...im trying ot make the same variables as yours.
 

Korolen

New User (Why do I keep getting those red bars?)
Reaction score
69
Can u tell me what s your variables and their '' fonction '' example...current_wave : unit-type array..!? i think thats the part i don'T understand...im trying ot make the same variables as yours.

I had three variables: Current_Wave, Wave_Types, and Current_Type. Current_Wave is an integer variable that stores the current wave the players are on, Wave_Types is a unit-type array that is initialized at the start of the map, and Current_Type is a unit-type variable that is changed each wave to be a random unit-type for that level.
 

Dismembered

New Member
Reaction score
1
God damn it...my new problem is...My lvl 1 isnt a random lvl ...it's the 1st unit in my '' level table ''...my 2nd lvl...is the 2nd unit in my '' level table ''....idk what s wrong.....damn..
 

Dismembered

New Member
Reaction score
1
I am using the same variable as you told me....and this is what my ''level table '' looks like...


Code:
Actions
    Set Current_wave_type = Wave_unit_types[((Current_wave x 10) + (Random integer number between 1 and 5))]
    -------- ---------------------------------------------------------------------------------------------------- --------
    -------- level 1 --------
    Set Wave_unit_types[1] = |cffff0000Unarmored Frog|r |cff7777aa[1]|r
    Set Wave_unit_types[2] = |cffff0000Heavy Armored Frog|r |cff7777aa[1]|r
    Set Wave_unit_types[3] = |cffff0000Medium Armored Frog|r |cff7777aa[1]|r
    Set Wave_unit_types[4] = |cffff0000Fortified Frog|r |cff7777aa[1]|r
    Set Wave_unit_types[5] = |cffff0000Light Armored Frog|r |cff7777aa[1]|r
    Set RoundAmount[1] = 5
    -------- ---------------------------------------------------------------------------------------------------- --------
    -------- level 2 --------
    Set Wave_unit_types[11] = |cffff0000Fortified Mutant Murloc|r |cff7777aa[2]|r
    Set Wave_unit_types[12] = |cffff0000Heavy Armored Mutant Murloc|r |cff7777aa[2]|r
    Set Wave_unit_types[13] = |cffff0000Light Armored Mutant Murloc|r |cff7777aa[2]|r
    Set Wave_unit_types[14] = |cffff0000Medium Armored Mutant Murloc|r |cff7777aa[2]|r
    Set Wave_unit_types[15] = |cffff0000Unarmored Mutant Murloc|r |cff7777aa[2]|r
    Set RoundAmount[2] = 5
 
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