Do I have too many triggers and variables?

Edward

New Member
Reaction score
2
My computer can handle a lot due to it's extreme RAM, however I'm not sure about the casual user.

My map has 410 variables and 400+ triggers (currently at 220 triggers but it will be 400+ when I'm done using variables).

Each trigger is relatively small, and most triggers are copies of others in order to avoid memory leaks.

I attached the map below.
 

Edward

New Member
Reaction score
2
Concerning the temp variables.

Right, but what happens if red and blue research the same unit at the exact same time?
 
Reaction score
54
In your map; nothing, since you aren't using waits or polled waits.

I wouldn't bother changing it now, it's too much work.
It's just a for future reference hint. ;)
 

Edward

New Member
Reaction score
2
Edward

Thank you.

Do you know any way to mass create triggers? For instance, I copy and paste a "template" trigger from the last one. So Red Unit Spawn, copy + paste, rename to Blue Unit Spawn.

Now can I change some of the variables in Blue Unit Spawn in mass? For instance can I turn all Player 1 (Red) to Player 2 (Blue).

Custom variables like A01, B01, C01. . . etc I wouldn't expect to be able to mass change, but for preset variables like Player 1 (Red) I would imagine that there would be a way?
 

Edward

New Member
Reaction score
2
As of right now, since there appears to be no mass creation/editing option, my variables and triggers are stored in a alpha-numeric library like you saw. That allows me to simply click what needs to be changed, hit the down arrow and hit enter (instead of searching for the new value).
 

Edward

New Member
Reaction score
2
Map protecting

I never understood why people protect their maps.

Now I do.

I don't want some scrub to open the object editor and rig the map and take credit for my HOURS (days) of work.
 
Reaction score
54
You could make the triggers a lot more general:

Change UnitSpawn to an Array and do at map initialization:
Trigger:
  • Set UnitSpawn[1] = (Center of Unit Spawn 1 Red <gen>)
    • ...
    • Set UnitSpawn[12] = (Center of Brown)


Have all the X Spawn on by default and change all of them to roughly in this manner:
Trigger:
  • Riflemen Spawn
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
    • FOR INTEGER A FROM 1 to 12
      • If ((Player A slot status) Equal to Has left the game) OR (Has not researched your Riflemen thing) then
    • do Nothing
    • else
      • Unit - Create 1 Riflemen for Player A at UnitSpawn[A] facing Default building facing degrees
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
dont worry your map wont lag with 400 triggers thats not to big
 
Reaction score
54
For the (Has not researched such upgrade) part, you are going to need to use Arrays of boolean, in this fashion:

Rifleman_Upgrade is an array of 12 booleans.

Turn on Rifleman
Trigger:
  • Events
    • Unit - A unit Finishes research
    • Conditions
      • (Researched tech-type) Equal to Call Rifleman
      • Actions
      • Set Rifleman_Upgrade[Player Number of Owner of Researching Unit] = true



Then instead of what I typed (Has not researched such upgrade), use: if Rifleman_Upgrade[Integer A] is true.
 

crabbb622

New Member
Reaction score
9
Thank you.

Do you know any way to mass create triggers? For instance, I copy and paste a "template" trigger from the last one. So Red Unit Spawn, copy + paste, rename to Blue Unit Spawn.

Now can I change some of the variables in Blue Unit Spawn in mass? For instance can I turn all Player 1 (Red) to Player 2 (Blue).

Custom variables like A01, B01, C01. . . etc I wouldn't expect to be able to mass change, but for preset variables like Player 1 (Red) I would imagine that there would be a way?

Autohotkey FTW (program that automatically types for you, moves your mouse, etc..)! I actually coded an autohotkey just so that I could mass create triggers. I had like 42 regions and I didn't know that you could use variables if you use add event to trigger, so i had to change each trigger to say Event - Unit enters region 1, region 2, region 3... xD
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top