• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Pls Help me understand whats wrong with my INDEX SYSTEM...

Status
Not open for further replies.
Level 29
Joined
Oct 24, 2012
Messages
6,543
can u plz post the triggers. http://www.hiveworkshop.com/forums/miscellaneous-tutorials-456/how-easily-post-triggers-163285/

this is ur problem
  • Do Multiple ActionsFor each (Integer TH_INT) from 1 to TH_INT, do (Actions)
U need to use a tempInt for the first looping integer and then from 1 to ur max index. Also u dont de-index anywere so u will hit the max array limit somewere.

My tutorial has a chapter on indexing that can help u. Things a GUIer Should Know. its in my sig.
The chapter in there is how to index
 
Last edited:
Level 9
Joined
May 27, 2012
Messages
116
thx i read your tutorial :)

Still dosnt work... i changed the stuff he told me but it dosent work if you dont belive me test the map... (updated it at the first post)
  • ThrowHammer cast
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to (==) Throw Hammer
    • Actions
      • Set TH_INT = (TH_INT + 1)
      • Set TempPoint[1] = (Position of (Triggering unit))
      • Set TempPoint[2] = (Target point of ability being cast)
      • -------- TempStuff ^ --------
      • Unit - Create 1 DummyHammer for (Owner of (Triggering unit)) at TempPoint[1] facing (Angle from TempPoint[1] to TempPoint[2]) degrees
      • Set TH_Caster[TH_INT] = (Triggering unit)
      • Set TH_Missile[TH_INT] = (Last created unit)
      • Set TH_Damage[TH_INT] = (Random real number between 1.00 and 300.00)
      • Set TH_Range[TH_INT] = 600.00
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • TH_INT Equal to (==) 1
          • Then - Actions
            • Trigger - Turn on ThrowHammer loop <gen>
          • Else - Actions
      • -------- Remove Leaks --------
      • Custom script: call RemoveLocation(udg_TempPoint[1])
      • Custom script: call RemoveLocation(udg_TempPoint[2])
  • ThrowHammer loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Do Multiple ActionsFor each (Integer TempINT) from 1 to TH_INT, do (Actions)
        • Loop - Actions
          • Set TempPoint[1] = (Position of TH_Missile[TH_INT])
          • Set TempPoint[2] = (TempPoint[1] offset by 35.00 towards (Facing of TH_Missile[TH_INT]) degrees)
          • Set TempUnitGroup = (Units within 50.00 of TempPoint[1] matching ((((Matching unit) belongs to an enemy of (Owner of TH_Missile[TH_INT])) Equal to (==) True) and (((Matching unit) is alive) Equal to (==) True)))
          • Unit Group - Pick every unit in TempUnitGroup and do (Actions)
            • Loop - Actions
              • Unit - Cause TH_Caster[TH_INT] to damage (Picked unit), dealing TH_Damage[TH_INT] damage of attack type Spells and damage type Normal
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Number of units in TempUnitGroup) Greater than or equal to (>=) 1
              • Then - Actions
                • Unit - Kill TH_Missile[TH_INT]
                • -------- End --------
                • Set TH_INT = (TH_INT - 1)
                  • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • TH_INT Equal to (==) 0
                    • Then - Actions
                      • Game - Display to (All players) the text: off
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
              • Else - Actions
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • TH_Range[TH_INT] Less than or equal to (<=) 0.00
              • Then - Actions
                • Unit - Kill TH_Missile[TH_INT]
                • -------- End --------
                • Set TH_INT = (TH_INT - 1)
                  • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • TH_INT Equal to (==) 0
                    • Then - Actions
                      • Game - Display to (All players) the text: off
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
              • Else - Actions
                • Unit - Move TH_Missile[TH_INT] instantly to TempPoint[2]
                • Set TH_Range[TH_INT] = (TH_Range[TH_INT] - 35.00)
          • Unit Group - Remove all units from TempUnitGroup
          • Custom script: call DestroyGroup(udg_TempUnitGroup)
          • Custom script: call RemoveLocation(udg_TempPoint[1])
          • Custom script: call RemoveLocation(udg_TempPoint[2])
 
Last edited by a moderator:
Status
Not open for further replies.
Top