1. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  2. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  3. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Trigger] A footman spawning trigger

Discussion in 'Triggers & Scripts' started by Giantr, Jan 28, 2009.

  1. Giantr

    Giantr

    Joined:
    Dec 4, 2007
    Messages:
    108
    Resources:
    0
    Resources:
    0
    Hello I'm making a footman frenzy type of a map and I was wondering how can I make efective triggering. Meaning should I make a seperate trigger for every player (highly improbable) or should I make a seperate trigger for every type of unit produced. If you have another sugestion feel free to share it :)
     
  2. Day-Elven

    Day-Elven

    Joined:
    Apr 3, 2008
    Messages:
    699
    Resources:
    0
    Resources:
    0
    You should not separate them at all xD
     
  3. Yixx

    Yixx

    Joined:
    Oct 12, 2008
    Messages:
    1,492
    Resources:
    3
    Spells:
    3
    Resources:
    3
    Make it a loop,,
    Maybe a loop in a loop?
    • For each Integer A from 1 to 12
      • loop - Actions
        • For each Integer B from 1 to (The amount of footman you want)
          • loop - Actions
            • Set TempLoc = Center of YourRegion
            • Create 1 Footman @ Temploc for (Player(Integer A))
    • Custom script: call RemoveLocation(udg_TempLoc)
     
  4. Giantr

    Giantr

    Joined:
    Dec 4, 2007
    Messages:
    108
    Resources:
    0
    Resources:
    0
    Can you enlight me how can I do that (not that i CAN'T jass for sh*t)
     
  5. Giantr

    Giantr

    Joined:
    Dec 4, 2007
    Messages:
    108
    Resources:
    0
    Resources:
    0
    How will this help I can create several footman with one single action without the need of intergers



    Edit : sorry for double post
     
  6. Yixx

    Yixx

    Joined:
    Oct 12, 2008
    Messages:
    1,492
    Resources:
    3
    Spells:
    3
    Resources:
    3
    Uhm, this way you can add them to a unit group easyly, if you dont want that, you can just create 5 (or so) footman directly under the Integer A loop
     
  7. Giantr

    Giantr

    Joined:
    Dec 4, 2007
    Messages:
    108
    Resources:
    0
    Resources:
    0
    Maybe but still I don't understand how can this help me please be more accurate
     
  8. Yixx

    Yixx

    Joined:
    Oct 12, 2008
    Messages:
    1,492
    Resources:
    3
    Spells:
    3
    Resources:
    3
    nvm, this is to let you see you dont need 12 triggers or so,,
     
  9. Giantr

    Giantr

    Joined:
    Dec 4, 2007
    Messages:
    108
    Resources:
    0
    Resources:
    0
    Can you be more specific (I'm want to learn you see)
     
  10. Day-Elven

    Day-Elven

    Joined:
    Apr 3, 2008
    Messages:
    699
    Resources:
    0
    Resources:
    0
    • Actions
      • Set TempGroup = (Units of type SpawningBuilding)
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - actions
          • Set TempLoc = (Position of (Picked unit))
          • Unit - Create 1 Spawn for (Owner of (Picked unit)) at TempLoc facing Default building facing (270.0) degrees
          • Point - Remove TempLoc
      • Unit Group - Destroy unit group TempGroup


    And you don't need loop if you want to create many units.

    Learn Jass so. There is no such word as"efficiency" if you're using GUI.
     
  11. Giantr

    Giantr

    Joined:
    Dec 4, 2007
    Messages:
    108
    Resources:
    0
    Resources:
    0
    Jass seems too much complex all that writing and such is not for me. And I'd rather learn GUI before setting out to do jass
     
  12. onix_noob

    onix_noob

    Joined:
    May 30, 2008
    Messages:
    433
    Resources:
    1
    Maps:
    1
    Resources:
    1
    i don't know what u need exactly but u need 1 trigger that have to be

    every X seconds of game time

    Actions
    if then else
    cond
    if units of type barrack for player 1 equal to 1
    act
    create 1 footman for player 1 at his start location

    if then else
    cond
    if units of type crypt for player 1 equal to 1
    act
    create 1 ghoul for player 1 at his start location

    and so on and this is symple and leak free
     
  13. Giantr

    Giantr

    Joined:
    Dec 4, 2007
    Messages:
    108
    Resources:
    0
    Resources:
    0
    • Spawn Footmen
      • Events
        • Time - Every 6.00 seconds of game time
      • Conditions
      • Actions
        • Set Unit_Group = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Barracks) and (((Matching unit) is alive) Equal to True)))
        • Unit Group - Pick every unit in Unit_Group and do (Actions)
          • Loop - Actions
            • Set Point = (Position of (Picked unit))
            • Unit - Create 1 Footman for (Owner of (Picked unit)) at Point facing Default building facing degrees
            • Custom script: call RemoveLocation(udg_Point)
        • Custom script: call DestroyGroup(udg_Unit_Group)


    I think this is better but there is one slight problem I have to do a seperate trigger for every unit (and that is not the most efficient way to go) So can anyone tell how can I not make a seperate trigger for every unit and if not possible I'll let it be.