"Warpten" via triggers?

needhelp2008

New Member
Reaction score
1
Hello,
Is there a way to Speed up construction of buildings and units / upgrades via trigger?

Could you tell me how to do it? i've tried with so many triggers, but only succeded on instant upgrades. I want to make it via triggers, jass or gui its okay :D.

Thanks in advance.
 

Whoareyou.

New Member
Reaction score
24
Warpten as in when you play Singleplayer not on Battle.net?

Events
Unit - A unit Begins construction
Conditions
Actions
Unit - Set (Picked unit) construction progress to 100%

I don't know if its Picked unit or Triggering unit, but try both of them, reply if none work!
 

Cheddar

This is the way it was meant to be.
Reaction score
126
I believe you'd use the aforementioned trigger with "Constructing unit".
 

babblejoe23

New Member
Reaction score
0
triggering unit also works... TRIGGERING UNIT refers to the unit who triggers the trigger. CONSTRUCTING UNIT could be more specific and also works. PICKED UNIT refers to units used in PICKED EVERY UNIT related actions and it will not work on that trigger.
 

needhelp2008

New Member
Reaction score
1
Events
Unit - A unit Begins construction
Conditions
Actions
Unit - Set (Triggering unit) construction progress to 100%

Doesnt works, i've tried it before thats why im posting here :D

Detonador sin nombre 001
Acontecimientos
Unidad - A unit Inicia construcción
Condiciones
Acciones
Unidad - Set (Constructing structure) construction progress to 100%
doesnt works either
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
you cannot change the building time for units, upgrades and such via triggers. its impossible with wc3 engine.
 

baassee

Member
Reaction score
5
Instead of construction process, make it simple, remove the constructioned building and create it on the same spot.
 

needhelp2008

New Member
Reaction score
1
Instead of construction process, make it simple, remove the constructioned building and create it on the same spot.

Good idea, but the problem is that when I build something, the building appears in another location (2-3 yds further) because the builder is too near

Trigger:
  • Detonador sin nombre 001
    • Acontecimientos
      • Unidad - A unit Inicia construcción
    • Condiciones
    • Acciones
      • Set Temp_Construction = (Constructing structure)
      • Set Temp_uConstruction_Loc = (Position of Temp_Construction)
      • Unidad - Remove Temp_Construction from the game
      • Unidad - Create 1 (Unit-type of Temp_Construction) for (Owner of Temp_Construction) at Temp_uConstruction_Loc facing Vista edificio predeterminada degrees
      • Custom script: call RemoveLocation (udg_Temp_uConstruction_Loc)


Edit: I've improved the trigger, but doesnt works either, the building appears in a different location.
Trigger:
  • Detonador sin nombre 001 Copiar
    • Acontecimientos
      • Unidad - A unit Inicia construcción
    • Condiciones
    • Acciones
      • Set Temp_Construction = (Constructing structure)
      • Set Temp_uConstruction_Loc = (Position of Temp_Construction)
      • Unidad - Remove Temp_Construction from the game
      • Región - Center RegionUnitsNearBuilding <gen> on Temp_uConstruction_Loc
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Si: Condiciones
        • Entonces: Acciones
          • Set Temp_Region_Group = (Units in RegionUnitsNearBuilding <gen>)
          • Grupo de unidad - Pick every unit in Temp_Region_Group and do (Actions)
            • Bucle: Acciones
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • Si: Condiciones
                  • (Unit-type of (Picked unit)) Igual a Campesino
                • Entonces: Acciones
                  • Set Temp_Constructor_Loc = (Position of (Picked unit))
                  • Unidad - Move (Picked unit) instantly to (Center of RegionCenterPlayableMapArea <gen>)
                  • Unidad - Create 1 (Unit-type of Temp_Construction) for (Owner of Temp_Construction) at Temp_uConstruction_Loc facing Vista edificio predeterminada degrees
                  • Unidad - Turn collision for (Picked unit) Apagado
                  • Unidad - Move (Picked unit) instantly to Temp_Constructor_Loc, facing (Position of Temp_Construction)
                  • Unidad - Turn collision for (Picked unit) Encendido
                  • Región - Center RegionUnitsNearBuilding <gen> on (Center of (Playable map area))
                • Otros: Acciones
                  • Do nothing
        • Otros: Acciones
          • Do nothing
      • Custom script: call RemoveLocation (udg_Temp_uConstruction_Loc)
      • Custom script: call RemoveLocation (udg_Temp_Constructor_Loc)
      • Custom script: call DestroyGroup (udg_Temp_Region_Group)


...And I don't know why this trigger isnt working:
Trigger:
  • Detonador sin nombre 001
    • Acontecimientos
      • Unidad - A unit Inicia construcción
    • Condiciones
    • Acciones
      • Set Temp_Construction = (Constructing structure)
      • Unidad - Set Temp_Construction construction progress to 99%


---------
Now I just need to find out how to play a sound for a specific player.
 

baassee

Member
Reaction score
5
No no no, save the position, remove the unit and create the unit on the same point. Else you have to do this with coordinates but if it wont work then wc3 bugs.
 

needhelp2008

New Member
Reaction score
1
Hmmm, i got it working but if anyone has a better version, feel free to post it here :p.
BTW, is it possible to play a specific sound for a player?
@thanks baassee for the idea, +rep

Trigger:
  • Instant Build
    • Acontecimientos
      • Unidad - A unit Inicia construcción
    • Condiciones
    • Acciones
      • Set Temp_Construction = (Constructing structure)
      • Set Temp_uConstruction_Loc = (Position of Temp_Construction)
      • Unidad - Remove Temp_Construction from the game
      • Región - Center RegionUnitsNearBuilding <gen> on Temp_uConstruction_Loc
      • Set TempUnitsInGroup = (Units in RegionUnitsNearBuilding <gen>)
      • Grupo de unidad - Pick every unit in TempUnitsInGroup and do (Actions)
        • Bucle: Acciones
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • Si: Condiciones
              • (Unit-type of (Picked unit)) Igual a Footman
            • Entonces: Acciones
              • Unidad - Hide (Picked unit)
              • Unidad - Create 1 (Unit-type of Temp_Construction) for (Owner of Temp_Construction) at Temp_uConstruction_Loc facing Vista edificio predeterminada degrees
              • Unidad - Turn collision for (Picked unit) Apagado
              • Unidad - Unhide (Picked unit)
              • Unidad - Turn collision for (Picked unit) Encendido
              • Selección - Select (Picked unit) for (Owner of Temp_Construction)
            • Otros: Acciones
              • Do nothing
      • Custom script: call RemoveLocation (udg_Temp_uConstruction_Loc)
      • Custom script: call DestroyGroup (udg_TempUnitsInGroup)
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
just create a new unit (building) and set its X and Y to the position of the old one. setting X and Y directly (jass function) ignores the pathing and collision of other units.
 

baassee

Member
Reaction score
5
No no no, save the position, remove the unit and create the unit on the same point. Else you have to do this with coordinates but if it wont work then wc3 bugs.

Nice one :D
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
you dont need to make the whole trigger in jass, only 2 lines of custom script.

SetUnitX(unit, x)
SetUnitY(unit y)
 
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