Building Limit

Avaleirra

Is back. Probably.
Reaction score
128
ok..... it didn;t work ):, wouldn't even let me build one factory. Just came up with a whole bunch of messages

Trigger:
  • genericfactorylimitred
    • Events
      • Unit - A unit Begins construction
      • Unit - A unit Begins an upgrade
    • Conditions
      • ((Unit-type of (Triggering unit)) Equal to Generic Factory (red)) or (((Unit-type of (Triggering unit)) Equal to Tier 1 Caster (red)) or (((Unit-type of (Triggering unit)) Equal to Tier 1 Melee (red)) or (((Unit-type of (Triggering unit)) Equal to Tier 1 Ranged (red)) or (((Unit-type of (Triggering unit)) Equal to Tier 2 Caste
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Unit-type of (Triggering unit)) Equal to Generic Factory (red)) or (((Unit-type of (Triggering unit)) Equal to Tier 1 Caster (red)) or (((Unit-type of (Triggering unit)) Equal to Tier 2 Caster (red)) or (((Unit-type o and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Picked unit) to myunitgroup[(Player number of (Owner of (Triggering unit)))]
          • Set Random_Data[(Player number of (Owner of (Triggering unit)))] = (Number of units in myunitgroup[(Player number of (Owner of (Triggering unit)))])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Random_Data[(Player number of (Owner of (Triggering unit)))] Equal to 8
            • Then - Actions
              • Animation - Play (Triggering unit)'s death animation
              • Unit - Remove (Triggering unit) from the game
              • Game - Display to (All players) the text: (You can only have 7 factories, + ((Name of (Owner of (Triggering unit))) + was stupid enough to build more and waste his money. Loser.))
              • Unit Group - Remove all units of myunitgroup[(Player number of (Owner of (Triggering unit)))] from myunitgroup[(Player number of (Owner of (Triggering unit)))]
            • Else - Actions
              • Do nothing
 

Avaleirra

Is back. Probably.
Reaction score
128
K, thats the same thing as removing leaks right? so, call DestroyGroup(udg_tempgroup)?
 

Avaleirra

Is back. Probably.
Reaction score
128
K it doesn't work it just comes up with a bunch of messages saying the message in the trigger... won't even let me build one :s

Trigger:
  • genericfactorylimitred
    • Events
      • Unit - A unit Begins construction
      • Unit - A unit Begins an upgrade
    • Conditions
      • ((Unit-type of (Triggering unit)) Equal to Generic Factory (red)) or (((Unit-type of (Triggering unit)) Equal to Tier 1 Caster (red)) or (((Unit-type of (Triggering unit)) Equal to Tier 1 Melee (red)) or (((Unit-type of (Triggering unit)) Equal to Tier 1 Ranged (red)) or (((Unit-type of (Triggering unit)) Equal to Tier 2 Caste
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Unit-type of (Triggering unit)) Equal to Generic Factory (red)) or (((Unit-type of (Triggering unit)) Equal to Tier 1 Caster (red)) or (((Unit-type of (Triggering unit)) Equal to Tier 2 Caster (red)) or (((Unit-type o and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Picked unit) to myunitgroup[(Player number of (Owner of (Triggering unit)))]
          • Set Random_Data[(Player number of (Owner of (Triggering unit)))] = (Number of units in myunitgroup[(Player number of (Owner of (Triggering unit)))])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Random_Data[(Player number of (Owner of (Triggering unit)))] Equal to 8
            • Then - Actions
              • Animation - Play (Triggering unit)'s death animation
              • Unit - Remove (Triggering unit) from the game
              • Game - Display to (All players) the text: (You can only have 7 factories, + ((Name of (Owner of (Triggering unit))) + was stupid enough to build more and waste his money. Loser.))
              • Unit Group - Remove all units from myunitgroup[(Player number of (Owner of (Triggering unit)))]
            • Else - Actions
              • Do nothing
 

Yoshii

New Member
Reaction score
74
whats the issue? the trigger only show the "player was stupid and wasted his ressource" ? or there are issue with building it wasnt very clear.

also shoulnt you use matching unit when using a matching condition
 

Avaleirra

Is back. Probably.
Reaction score
128
When I tried constructing a structure, it wouldn't even let me build one. And when I tried to it came up with a whole bunch of "player was stupid and wasted his resources"
 

Yoshii

New Member
Reaction score
74
well you could post the map would make life easier on me but if dont want to;
use a debugg message what you described seem to be because the variable is always set to 8 no matter what.

example make a -test command trigger and have it display the string(integer(randomdata(playernumber)))
 

Avaleirra

Is back. Probably.
Reaction score
128
Don't have access to a computer right now but I will post the map ASAP :)


EDIT: my map is 500kb too big, what do I do?
 

Yoshii

New Member
Reaction score
74
whats the dif between building(red) and building(blue) you have 5 trigger that basically do same thing
 

Avaleirra

Is back. Probably.
Reaction score
128
its for each player, red is the only one with the "new" trigger. All the players have different generic factories
 

Yoshii

New Member
Reaction score
74
you dont need a type of building for each player unless its different. also you only need a single trigger to do all the player since you are using array
 

Avaleirra

Is back. Probably.
Reaction score
128
you dont need a type of building for each player unless its different. also you only need a single trigger to do all the player since you are using array

All the buildings are different for each player. And could you show me what that single trigger would look like?
 
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