• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Spawn unit on dead enemy unit, with tiers. (Zombie Trigger)

Level 4
Joined
Sep 10, 2023
Messages
43
Hello. I need to make a trigger that spawns a unit for the killing unit player in the corpse (or position) of the dead enemy player unit. And I need to make it so different tiers (evolutions) spawns different units.
I cant seem to make it work. I created a Mutate zombie upgrade with T0 that starts at map initialization to make the t0 zombie spawn on dead units.

This is the Setup

  • ZombieEvolution Setup
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Player - Set the current research level of Mutate Zombie T0 to 1 for Player 11 (Dark Green)
      • Player - Set the current research level of Mutate Zombie T0 to 1 for Player 12 (Brown)
      • -------- Number Of Evolutions --------
      • Set VariableSet Evolution_Count = 4
      • -------- Type of evolutions --------
      • Set VariableSet ZombieEvolution_TechType[0] = Mutate Zombie T0
      • Set VariableSet ZombieEvolution_TechType[1] = Mutate Zombie T2
      • Set VariableSet ZombieEvolution_TechType[2] = Mutate Zombie T3
      • Set VariableSet ZombieEvolution_TechType[3] = Mutate Zombie T4

This is the trigger

  • Infestation
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) belongs to an enemy of (Owner of (Killing unit)).) Equal to True
    • Actions
      • Set VariableSet Point = (Position of (Dying unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Evolution_Count Equal to 0
        • Then - Actions
          • If ((Owner of (Triggering unit)) Equal to Player 11 (Dark Green)) then do (Unit - Create 1 Zombie (T1) for Player 11 (Dark Green) at Point facing Default building facing degrees) else do (Do nothing)
          • If ((Owner of (Triggering unit)) Equal to Player 12 (Brown)) then do (Unit - Create 1 Zombie (T1) for Player 12 (Brown) at Point facing Default building facing degrees) else do (Do nothing)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Killing unit)) Not equal to Player 11 (Dark Green)
              • (Owner of (Killing unit)) Not equal to Player 12 (Brown)
            • Then - Actions
              • Unit - Create 1 Zombie (T1) for (Owner of (Killing unit)) at Point facing Default building facing degrees
            • Else - Actions
        • Else - Actions
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,550
You've set Evolution_Count to 4:
  • Set VariableSet Evolution_Count = 4
Then you check to see if it's equal to 0:
  • If - Conditions
    • Evolution_Count Equal to 0
4 is NOT equal to 0, so your Then - Actions never run.


It may be smarter to use a single Upgrade that has 4 levels than to have 4 Upgrades with 1 level each. That way you can use the upgrade level as a direct reference in your Arrays:
  • ZombieEvolution Setup
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Set VariableSet ZombieEvolution_UnitType[0] = Zombie (T0)
      • Set VariableSet ZombieEvolution_UnitType[1] = Zombie (T1)
      • Set VariableSet ZombieEvolution_UnitType[2] = Zombie (T2)
      • Set VariableSet ZombieEvolution_UnitType[3] = Zombie (T3)
      • Set VariableSet ZombieEvolution_UnitType[4] = Zombie (T4)
  • Events
    • Unit - A unit dies
  • Conditions
    • ((Triggering unit) belongs to an enemy of (Owner of (Killing unit)).) Equal to True
  • Actions
    • Set Variable Point = (Position of (Triggering unit))
    • Set Variable Zombie_Player = (Owner of (Killing unit))
    • Set Variable Zombie_Tech_Level = (Current research level of Mutate Zombie for Zombie_Player)
    • Unit - Create 1 ZombieEvolution_UnitType[Zombie_Tech_Level] for Zombie_Player at Point facing Default building facing degrees
    • Custom script: call RemoveLocation( udg_Point )
ZombieEvolution_UnitType would be a Unit-Type array variable that has references to your different Zombies. It'd be setup exactly the same way as ZombieEvolution_TechType with the [index] matching the level of the tech.


But if you wish to keep relying on your 4 different Upgrades then you can instead track Zombie_Tech_Level yourself on a per Player basis:
  • Events
    • Unit - A unit Finishes research
  • Conditions
    • Or - Multiple conditions
      • (Researched tech-type) Equal to ZombieEvolution_TechType[0]
      • (Researched tech-type) Equal to ZombieEvolution_TechType[1]
      • (Researched tech-type) Equal to ZombieEvolution_TechType[2]
      • (Researched tech-type) Equal to ZombieEvolution_TechType[3]
  • Actions
    • Set Variable Zombie_Player = (Owner of (Triggering unit))
    • Set Variable Zombie_PN = (Player number of Zombie_Player)
    • Set Variable Zombie_Tech_Level[Zombie_PN] = Zombie_Tech_Level[Zombie_PN] + 1
  • Events
    • Unit - A unit dies
  • Conditions
    • ((Triggering unit) belongs to an enemy of (Owner of (Killing unit)).) Equal to True
  • Actions
    • Set Variable Point = (Position of (Triggering unit))
    • Set Variable Zombie_Player = (Owner of (Killing unit))
    • Set Variable Zombie_PN = (Player number of Zombie_Player)
    • Set Variable Tech_Level = Zombie_Tech_Level[Zombie_PN]
    • Unit - Create 1 ZombieEvolution_UnitType[Tech_Level] for Zombie_Player at Point facing Default building facing degrees
    • Custom script: call RemoveLocation( udg_Point )
Zombie_Tech_Level has been modified into an Array variable which you would manage yourself whenever a player researches a Zombie Evolution upgrade. This is tracked separately for each Player. So if Player 1 (Red) upgraded Mutate Zombie T3 it'll be equal to 3 for them.
 
Last edited:
Level 4
Joined
Sep 10, 2023
Messages
43
if.gif
Or - Multiple conditions
  • empty.gif
    join.gif
    if.gif
    (Researched tech-type) Equal to ZombieEvolution_TechType[0]

Cant find this condition as if I put or, multiple conditions I get this
1708054165487.png
 
Level 4
Joined
Sep 10, 2023
Messages
43
  • Events
    • Unit - A unit dies
  • Conditions
    • ((Triggering unit) belongs to an enemy of (Owner of (Killing unit)).) Equal to True
  • Actions
    • Set Variable Point = (Position of (Triggering unit))
    • Set Variable Zombie_Player = (Owner of (Killing unit))
    • Set Variable Zombie_PN = (Player number of Zombie_Player)
    • Set Variable [B][COLOR=rgb(250, 197, 28)]Tech_Level[/COLOR][/B] = Zombie_Tech_Level[Zombie_PN]
    • Unit - Create 1 ZombieEvolution_UnitType[[B][COLOR=rgb(250, 197, 28)]Tech_Level[/COLOR][/B]] for Zombie_Player at Point facing Default building facing degrees
    • Custom script: call RemoveLocation( udg_Point )
Zombie_Tech_Level has been modified into an Array variable which you would manage yourself whenever a player researches a Zombie Evolution upgrade. This is tracked separately for each Player. So if Player 1 (Red) upgraded Mutate Zombie T3 it'll be equal to 3 for them.
What kind of variable is Tech_Level ?

I cant put it inside the create unit trigger


1708154015565.png
1708154067088.png
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,550
Ask yourself, what type of variable can I put inside there? What type of variable is Zombie_PN?

(Hint: they're all the same type)

Also, note that a variable can only be set to another variable if they're the same type. You can't set an Item variable to a Unit variable for instance.

So when you see this:
  • Set Variable Zombie_Tech_Level[Zombie_PN] = Zombie_Tech_Level[Zombie_PN] + 1
  • Set Variable Tech_Level = Zombie_Tech_Level[Zombie_PN]
If you know what type of variable Zombie_Tech_Level is then it becomes very clear what type of variable Tech_Level is.
 
Last edited:
Level 4
Joined
Sep 10, 2023
Messages
43
Ask yourself, what type of variable can I put inside there? What type of variable is Zombie_PN?

(Hint: they're all the same type)

Also, note that a variable can only be set to another variable if they're the same type. You can't set an Item variable to a Unit variable for instance.

So when you see this:
  • Set Variable Zombie_Tech_Level[Zombie_PN] = Zombie_Tech_Level[Zombie_PN] + 1
  • Set Variable Tech_Level = Zombie_Tech_Level[Zombie_PN]
If you know what type of variable Zombie_Tech_Level is then it becomes very clear what type of variable Tech_Level is.
Im really trying to understand but I think I got it wrong from the start. I put Zombie_PN variable as an interger I dont know if is it ok. And I dont know if its ok but I put Zombie_Tech_Level as a Tech-type (array), so it would mean that Tech_Level is a tech-type too?-

Or when you said that a variable can only be set to another variable if they are the same type and you ask What type of variable is Zombie_PN? and hint that they are all the same that means they are all intergers?


:vw_death:
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,550
I put Zombie_Tech_Level as a Tech-type (array)
Zombie_Tech_Level is an Integer array. I'm using it to keep track of the level of the tech for each Player.

that means they are all intergers?
Yes, they're all Integers. You can only use Integers as the [index] of an Array:
  • Set Variable SomeArray[100] = blah blah blah
The index is the number you put in the [brackets].


Here's an analogy that may help. An Array is like a grocery list:
[1]: Apples
[2]: Milk
[3]: Eggs

It helps you keep track of things in an organized way. So the numbers in your grocery list act like the [index] and the food is the value.

But we're playing Warcraft 3 here so it'll be something other than groceries:
[1]: Footman
[2]: Knight
[3]: Rifleman

Or whatever it is you're trying to keep track of.

But Arrays can do more than just keep track of things in a list. Understand that you are free to define what your [index] represents. So for example you could use [1] to represent Player 1 (Red), [2] could represent Player 2 (Blue), and so on for each Player. This use of the [index] allows you to create variable arrays that store data for each Player. This is what I'm doing with the Zombie_Tech_Level array.
 
Last edited:
Level 4
Joined
Sep 10, 2023
Messages
43
Zombie_Tech_Level is an Integer array. I'm using it to keep track of the level of the tech for each Player.


Yes, they're all Integers. You can only use Integers as the [index] of an Array:
  • Set Variable SomeArray[100] = blah blah blah
The index is the number you put in the [brackets].


Here's an analogy that may help. An Array is like a grocery list:
[1]: Apples
[2]: Milk
[3]: Eggs

It helps you keep track of things in an organized way. So the numbers in your grocery list act like the [index] and the food is the value.

But we're playing Warcraft 3 here so it'll be something other than groceries:
[1]: Footman
[2]: Knight
[3]: Rifleman

Or whatever it is you're trying to keep track of.

But Arrays can do more than just keep track of things in a list. Understand that you are free to define what your [index] represents. So for example you could use [1] to represent Player 1 (Red), [2] could represent Player 2 (Blue), and so on for each Player. This use of the [index] allows you to create variable arrays that store data for each Player. This is what I'm doing with the Zombie_Tech_Level array.
Oh thanks! I didnt know that variables could only be set on the same type. I did what you said and it worked!. But it only worked for t0 zombies and not the other ones. I tried checking with the variables and ZombieEvolution_UnitType but it didnt work. Dont know what else could be failing.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,550
I have to see your triggers to know what you did wrong.

But if it only works for t0 zombies it sounds like you aren't increasing Zombie_Tech_Level at all and you're getting the default value of 0.

All variables have a default value.
Integers = 0
Reals = 0.00
Strings = ""
Booleans = False
The Others = Null
 
Last edited:
Level 4
Joined
Sep 10, 2023
Messages
43
I have to see your triggers to know what you did wrong.

But if it only works for t0 zombies it sounds like you aren't increasing Zombie_Tech_Level at all and you're getting the default value of 0.

All variables have a default value.
Integers = 0
Reals = 0.00
Stings = ""
Booleans = False
The Others = Null
Mmmmmm I dont know. Should I make a t0 tech that starts finished at the beginning for the players or that doesnt has anything to do with it? I choose the path with 4 different upgrades as you already helped me to set a trigger that makes shared players upgrade their units as tiers when one of them finishes a research. I tried changing the size of the zombie_tech_level array and it didnt work. Maybe I have to add a count variable?

  • Set VariableSet Zombie_Tech_Level[Zombie_PN] = Zombie_Tech_Level[(Zombie_PN + 1)]
  • Set VariableSet Tech_Level = Zombie_Tech_Level[Zombie_PN]
  • Infestation Setup
    • Events
      • Unit - A unit Finishes research
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
      • (Researched tech-type) Equal to ZombieEvolution_TechType[0]
      • (Researched tech-type) Equal to ZombieEvolution_TechType[1]
      • (Researched tech-type) Equal to ZombieEvolution_TechType[2]
      • (Researched tech-type) Equal to ZombieEvolution_TechType[3]
    • Actions
      • Set VariableSet Zombie_Player = (Owner of (Triggering unit))
      • Set VariableSet Zombie_PN = (Player number of (Owner of (Triggering unit)))
      • Set VariableSet Zombie_Tech_Level[Zombie_PN] = Zombie_Tech_Level[(Zombie_PN + 1)]

  • Infestation Unit type
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Set VariableSet ZombieEvolution_UnitType[0] = Zombie (T1)
      • Set VariableSet ZombieEvolution_UnitType[1] = Ravenous Zombie (T2)
      • Set VariableSet ZombieEvolution_UnitType[2] = Mutated Zombie (T3)
      • Set VariableSet ZombieEvolution_UnitType[3] = Ghoul (T4)

  • Infestation
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) belongs to an enemy of (Owner of (Killing unit)).) Equal to True
    • Actions
      • Set VariableSet Point = (Position of (Triggering unit))
      • Set VariableSet Zombie_Player = (Owner of (Killing unit))
      • Set VariableSet Zombie_PN = (Player number of Zombie_Player)
      • Set VariableSet Tech_Level = Zombie_Tech_Level[Zombie_PN]
      • Unit - Create 1 ZombieEvolution_UnitType[Tech_Level] for Zombie_Player at Point facing Default building facing degrees
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,550
Look at the Conditions in Infestation Setup, you aren't using the Or - Any (Conditions) are true.
Your Conditions need to be dragged into that.

Bad:
  • Conditions
    • Or - Any (Conditions) are true
      • Conditions
    • (Researched tech-type) Equal to ZombieEvolution_TechType[0]
    • (Researched tech-type) Equal to ZombieEvolution_TechType[1]
    • (Researched tech-type) Equal to ZombieEvolution_TechType[2]
    • (Researched tech-type) Equal to ZombieEvolution_TechType[3]
Good:
  • Conditions
    • Or - Any (Conditions) are true
      • Conditions
        • (Researched tech-type) Equal to ZombieEvolution_TechType[0]
        • (Researched tech-type) Equal to ZombieEvolution_TechType[1]
        • (Researched tech-type) Equal to ZombieEvolution_TechType[2]
        • (Researched tech-type) Equal to ZombieEvolution_TechType[3]
You also never remove Point:
  • Unit - Create 1 ZombieEvolution_UnitType[Tech_Level] for Zombie_Player at Point facing Default building facing degrees
  • Custom script: call RemoveLocation( udg_Point )
This won't fix or break anything but it's a memory leak worth cleaning up.
 
Level 4
Joined
Sep 10, 2023
Messages
43
Look at the Conditions in Infestation Setup, you aren't using the Or - Any (Conditions) are true.
Your Conditions need to be dragged into that.

Bad:
  • Conditions
    • Or - Any (Conditions) are true
      • Conditions
    • (Researched tech-type) Equal to ZombieEvolution_TechType[0]
    • (Researched tech-type) Equal to ZombieEvolution_TechType[1]
    • (Researched tech-type) Equal to ZombieEvolution_TechType[2]
    • (Researched tech-type) Equal to ZombieEvolution_TechType[3]
Good:
  • Conditions
    • Or - Any (Conditions) are true
      • Conditions
        • (Researched tech-type) Equal to ZombieEvolution_TechType[0]
        • (Researched tech-type) Equal to ZombieEvolution_TechType[1]
        • (Researched tech-type) Equal to ZombieEvolution_TechType[2]
        • (Researched tech-type) Equal to ZombieEvolution_TechType[3]
You also never remove Point:
  • Unit - Create 1 ZombieEvolution_UnitType[Tech_Level] for Zombie_Player at Point facing Default building facing degrees
  • Custom script: call RemoveLocation( udg_Point )
This won't fix or break anything but it's a memory leak worth cleaning up.
Ok I dragged the researched tech-type but still it doesnt changes the unit when tier 2 is researched. Maybe it has something to do with the variables.

  • Infestation Setup
    • Events
      • Unit - A unit Finishes research
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Researched tech-type) Equal to ZombieEvolution_TechType[0]
          • (Researched tech-type) Equal to ZombieEvolution_TechType[1]
          • (Researched tech-type) Equal to ZombieEvolution_TechType[2]
          • (Researched tech-type) Equal to ZombieEvolution_TechType[3]
    • Actions
      • Set VariableSet Zombie_Player = (Owner of (Triggering unit))
      • Set VariableSet Zombie_PN = (Player number of (Owner of (Triggering unit)))
      • Set VariableSet Zombie_Tech_Level[Zombie_PN] = Zombie_Tech_Level[(Zombie_PN + 1)]

1708281810165.png
1708281872858.png
1708281934416.png
1708282046925.png
 

Attachments

  • 1708282003415.png
    1708282003415.png
    4.3 KB · Views: 2

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,550
You made a small error in your Arithmetic. Notice how you're adding 1 to Zombie_PN. You want to Add 1 to Zombie_Tech_Level[Zombie_PN].

Bad:
  • Set VariableSet Zombie_Tech_Level[Zombie_PN] = Zombie_Tech_Level[(Zombie_PN + 1)]
Good:
  • Set VariableSet Zombie_Tech_Level[Zombie_PN] = (Zombie_Tech_Level[Zombie_PN] + 1)
I'm glad I spotted this, I've spent hours on this same problem in the past. Very easy mistake to make and not notice.
 
Level 4
Joined
Sep 10, 2023
Messages
43
You made a small error in your Arithmetic. Notice how you're adding 1 to Zombie_PN. You want to Add 1 to Zombie_Tech_Level[Zombie_PN].

Bad:
  • Set VariableSet Zombie_Tech_Level[Zombie_PN] = Zombie_Tech_Level[(Zombie_PN + 1)]
Good:
  • Set VariableSet Zombie_Tech_Level[Zombie_PN] = (Zombie_Tech_Level[Zombie_PN] + 1)
I'm glad I spotted this, I've spent hours on this same problem in the past. Very easy mistake to make and not notice.
Mmm ok I fixed that but it still just only spawns t0 units


  • Infestation Setup
    • Events
      • Unit - A unit Finishes research
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Researched tech-type) Equal to ZombieEvolution_TechType[0]
          • (Researched tech-type) Equal to ZombieEvolution_TechType[1]
          • (Researched tech-type) Equal to ZombieEvolution_TechType[2]
          • (Researched tech-type) Equal to ZombieEvolution_TechType[3]
    • Actions
      • Set VariableSet Zombie_Player = (Owner of (Triggering unit))
      • Set VariableSet Zombie_PN = (Player number of (Owner of (Triggering unit)))
      • Set VariableSet Zombie_Tech_Level[Zombie_PN] = (Zombie_Tech_Level[Zombie_PN] + 1)
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,550
It looks good to me, try adding text messages to see what's happening.

So add a new Text Message action after you increase Zombie_Tech_Level[Zombie_PN] by 1. Then do the same thing after you set Tech_Level:
  • Set VariableSet Tech_Level = Zombie_Tech_Level[Zombie_PN]
  • Game - Display to (All players) for 30.00 seconds the text: (String(Tech_Level))
That way you know exactly what the values are in-game. The function to display an Integer in your Text Message is called Convert Integer To String.

Also, remember that Zombie_Tech_Level starts out at 0 and increases by 1 every time you research ANY of those tech upgrades. I assume you can only upgrade them in this order: Tier 1 -> Tier 2 -> Tier 3 -> Tier 4. Otherwise, you'll get mixed results.

Note that you may need to adjust the value of Zombie_Tech_Level by subtracting 1 from it or adding 1 to it. But we can worry about that once you get it working to begin with.
 
Last edited:
Level 4
Joined
Sep 10, 2023
Messages
43
It looks good to me, try adding text messages to see what's happening.

So add a new Text Message action after you increase Zombie_Tech_Level[Zombie_PN] by 1. Then do the same thing after you set Tech_Level:
  • Set VariableSet Tech_Level = Zombie_Tech_Level[Zombie_PN]
  • Game - Display to (All players) for 30.00 seconds the text: (String(Tech_Level))
That way you know exactly what the values are in-game. The function to display an Integer in your Text Message is called Convert Integer To String.

Also, remember that Zombie_Tech_Level starts out at 0 and increases by 1 every time you research ANY of those tech upgrades. I assume you can only upgrade them in this order: Tier 1 -> Tier 2 -> Tier 3 -> Tier 4. Otherwise, you'll get mixed results.

Note that you may need to adjust the value of Zombie_Tech_Level by subtracting 1 from it or adding 1 to it. But we can worry about that once you get it working to begin with.
Was wondering what could be wrong and I noticed this. I didnt understand how the researched tech type was put on the trigger without telling what was the research so I tried manually putting it and did this.

  • events.gif
    Events
    • joinbottom.gif
      unit.gif
      Unit - A unit Finishes research
  • cond.gif
    Conditions
    • joinbottomminus.gif
      if.gif
      Or - Multiple conditions
      • empty.gif
        join.gif
        if.gif
        (Researched tech-type) Equal to ZombieEvolution_TechType[0]
      • empty.gif
        join.gif
        if.gif
        (Researched tech-type) Equal to ZombieEvolution_TechType[1]
      • empty.gif
        join.gif
        if.gif
        (Researched tech-type) Equal to ZombieEvolution_TechType[2]
      • empty.gif
        joinbottom.gif
        if.gif
        (Researched tech-type) Equal to ZombieEvolution_TechType[3]

  • Infestation Setup
    • Events
      • Unit - A unit Finishes research
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Researched tech-type) Equal to ZombieEvolution_TechType[0]
          • (Researched tech-type) Equal to Mutate Zombie T2
          • (Researched tech-type) Equal to Mutate Zombie T3
          • (Researched tech-type) Equal to Mutate Zombie T4
    • Actions
      • Set VariableSet Zombie_Player = (Owner of (Triggering unit))
      • Set VariableSet Zombie_PN = (Player number of (Owner of (Triggering unit)))
      • Set VariableSet Zombie_Tech_Level[Zombie_PN] = (Zombie_Tech_Level[Zombie_PN] + 1)
      • Game - Display to (All players) for 30.00 seconds the text: (Localize((String(Zombie_Tech_Level[Zombie_PN]))))

And it worked! Thank you for your time and patience. (Also added the message thing and it showed 2, 3 and 4 when it supposed to).
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,550
Was wondering what could be wrong and I noticed this. I didnt understand how the researched tech type was put on the trigger without telling what was the research so I tried manually putting it and did this. And it worked! Thank you for your time and patience. (Also added the message thing and it showed 2, 3 and 4 when it supposed to).
No problem, and if you know for a fact that you've setup ZombieEvolution_TechType[1], [2], and [3] correctly then that leads me to believe that you need to change the variable's Array Size. This is usually unnecessary but a few variable types require it.

Open the Variable Editor (it must be done in there!) and change the Size from 1 to 20:
1708283653122.png

The other Variable Types that need a Size are Unit Groups, Player Groups, and Timers. This "initializes" that many of these variables for you to use and means that your [index] can't go above that number. Other variable types can be left at the default Size of 1 because they have automatic "resizing".
 
Last edited:
Level 4
Joined
Sep 10, 2023
Messages
43
No problem, and if you know for a fact that you've setup ZombieEvolution_TechType[1], [2], and [3] correctly then that leads me to believe that you need to change the variable's Array Size. This is usually unnecessary but a few variable types require it.


Open the Variable Editor (it must be done in there!) and change the Size from 1 to 20:
View attachment 462156
The other Variable Arrays that need a Size are Unit Groups, Player Groups, and Timers.
Yeah I tried with that too but just when I change the size it goes from 4 or 20 or whatever back to 1.
 
Top