• 🏆 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] Triggering a AI

Status
Not open for further replies.
Level 14
Joined
Jan 5, 2009
Messages
1,127
Hello, Crazed_seal here.
I was wondering have I done this right.
It is a basic AI that uses GUI triggers.
It kinda works.
  • Helicopters
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
      • Base_Current_Attack_wave Greater than or equal to 4
    • Actions
      • Trigger - Turn off (This trigger)
      • Unit - Order UHF Headquaters 0025 <gen> to train/upgrade to a Enslaved Work Bot
      • Player - Add 1000 to Player 2 (Blue) Current gold
      • Player - Add 1000 to Player 2 (Blue) Current lumber
  • Helicopter Build
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
      • (Triggering unit) Equal to UHF Headquaters 0025 <gen>
      • (Unit-type of (Trained unit)) Equal to Enslaved Work Bot
    • Actions
      • Set Base_Worker = (Trained unit)
      • Player - Add 1000 to Player 2 (Blue) Current gold
      • Player - Add 1000 to Player 2 (Blue) Current lumber
      • Unit - Order Base_Worker to build a Helipad at Base_Helipad_Point
      • Trigger - Turn on Worker Dies <gen>
  • Helicopters Produce
    • Events
      • Unit - A unit Finishes construction
    • Conditions
      • (Triggering unit) Equal to Base_Worker
      • (Unit-type of (Constructed structure)) Equal to Helipad
    • Actions
      • Set Base_Helipad = (Constructed structure)
      • Unit - Order Base_Worker to Harvest Mineral Mine 0127 <gen>
  • Helicopters Train
    • Events
      • Time - Every 30.00 seconds of game time
    • Conditions
      • (Base_Helipad is alive) Equal to True
    • Actions
      • Unit - Order Base_Helipad to train/upgrade to a Cobra Helicopter
  • Helicopter Go
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
      • (Triggering unit) Equal to Base_Helipad
      • (Unit-type of (Trained unit)) Equal to Cobra Helicopter
    • Actions
      • Unit - Order (Trained unit) to Attack-Move To Base_Attack_Point
  • Worker Dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Triggering unit) Equal to Base_Worker
    • Actions
      • Unit - Order UHF Headquaters 0025 <gen> to train/upgrade to a Enslaved Work Bot
  • Worker Constructe
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
      • (Triggering unit) Equal to UHF Headquaters 0025 <gen>
    • Actions
      • Set Base_Worker = (Trained unit)
 
Level 5
Joined
Nov 30, 2010
Messages
184
I think you put a wrong command. Order Base_Helipad to train/upgrade to a Cobra Helicopter. To me it seems like you are requesting the helipad to upgrade it self to a cobra helicopter(like a town hall upgrades into a keep). It could possibly be this or it's just a Harmless sentence error. (GUI makes a lot of these because they just insert your command/part of a command without changing the overall sentence structure to fit it.)
 
Level 14
Joined
Jan 5, 2009
Messages
1,127
I checked its the right command.
Im changing it around alittle instead of the Helipad being built its already preplaced.
Im making the workers repair and harvest gold. And if one structure dies it gets replaced...
But I wonder what happens if they get rebuilt... they might not produce anymore.
I might start learning abit of JASS.
 
Status
Not open for further replies.
Top