• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Trigger Request [build time]

Status
Not open for further replies.
Level 5
Joined
Dec 8, 2012
Messages
149
Hey i found some map using this, i just want to automatic create a unit without the loading bar when you train unit and also i test the build time to 0 but it's not working....

For those trying to help me or who can help me i will give +rep
 
Level 37
Joined
Mar 6, 2006
Messages
9,243


  • ITS Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set bht = (Last created hashtable)
      • -------- -------------------------------------------------- --------
      • Set ut1 = Barracks // Unit type that trains
      • Set ut2 = Footman // Trained unit type
      • Set s = footman // Order string, enable OrderId trigger to check order strings
      • Set i3 = 135 // Gold cost
      • Set i4 = 0 // Lumber cost
      • Set snd = FootmanReady1 <gen> // Sound to be played. Go to sound editor, search the sound and right click for "use as sound".
      • -------- -------------------------------------------------- --------
      • Trigger - Run ITS Register <gen> (ignoring conditions)
      • -------- -------------------------------------------------- --------
      • -------- -------------------------------------------------- --------
      • Set ut1 = Barracks
      • Set ut2 = Rifleman
      • Set s = rifleman
      • Set i3 = 205
      • Set i4 = 30
      • Set snd = RiflemanReady1 <gen>
      • -------- -------------------------------------------------- --------
      • Trigger - Run ITS Register <gen> (ignoring conditions)
      • -------- -------------------------------------------------- --------
  • ITS Register
    • Events
    • Conditions
    • Actions
      • Custom script: set udg_i1 = udg_ut1
      • Custom script: set udg_i2 = udg_ut2
      • Custom script: call SaveInteger(udg_bht, udg_i1, UnitId(udg_s), udg_i2)
      • Custom script: call SaveInteger(udg_bht, UnitId(udg_s), 0, udg_i3)
      • Custom script: call SaveInteger(udg_bht, UnitId(udg_s), 1, udg_i4)
      • Custom script: call SaveSoundHandle(udg_bht, UnitId(udg_s), 2, udg_snd)
  • ITS InstaTrain
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • Custom script: set udg_i1 = GetIssuedOrderId()
      • Custom script: if HaveSavedInteger(udg_bht, GetUnitTypeId(GetTriggerUnit()), udg_i1) then
      • Set u = (Triggering unit)
      • Set p = (Position of u)
      • Unit Group - Add u to g
      • Trigger - Turn on ITS Stop <gen>
      • Custom script: set udg_ut1 = LoadInteger(udg_bht, GetUnitTypeId(udg_u), udg_i1)
      • Unit - Create 1 ut1 for (Triggering player) at p facing Default building facing degrees
      • Custom script: set udg_i1 = udg_ut1
      • Player - Set (Triggering player) Current gold to (((Triggering player) Current gold) - (Load 0 of i1 from bht))
      • Player - Set (Triggering player) Current lumber to (((Triggering player) Current lumber) - (Load 1 of i1 from bht))
      • Sound - Play (Load 2 of i1 in bht) at 100.00% volume, attached to (Last created unit)
      • Unit - Order (Last created unit) to Attack-Move To (Rally-Point of (Triggering unit) as a point)
      • Custom script: call RemoveLocation(udg_p)
      • Custom script: endif
  • ITS Stop
    • Events
      • Time - Every 0.00 seconds of game time
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Trigger - Turn off ITS InstaTrain <gen>
      • Unit Group - Pick every unit in g and do (Actions)
        • Loop - Actions
          • Custom script: call IssueImmediateOrderById(GetEnumUnit(), 851976)
      • Trigger - Turn on ITS InstaTrain <gen>
 

Attachments

  • InstaBuild.w3x
    15 KB · Views: 38
Status
Not open for further replies.
Top