• 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.

Spell Request

Status
Not open for further replies.
Level 6
Joined
Oct 4, 2011
Messages
226
I don't think regions are the answer. I havn't made the whole ability but i think it could help you and this is how the trees should be searched for most likely. (I realize the "I prefer trigger not test map" wasn't exactly given, sorry buddy! :D)
 

Attachments

  • Natural Cloak Example[A].w3x
    21.4 KB · Views: 42
Level 6
Joined
Oct 4, 2011
Messages
226
  • Natural cloak
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Channel
    • Actions
      • Set TempUnit = (Casting unit)
      • Set TempInteger = (Level of Channel for TempUnit)
      • Set TempInteger2 = 0
      • Set TempLocation = (Position of TempUnit)
      • Destructible - Pick every destructible within 300.00 of TempLocation and do (Actions)
        • Loop - Actions
          • Set TempDestructible = (Picked destructible)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Destructible-type of TempDestructible) Equal to Summer Tree Wall
            • Then - Actions
              • Set TempInteger2 = (TempInteger2 + 1)
              • Game - Display to (All players) for 2.00 seconds the text: |cff22ff22Trees Fou...
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TempInteger2 Greater than 0
        • Then - Actions
          • -------- If 0 trees are in range then this won't happen. --------
          • -------- All hashtable information should be stored here --------
          • Unit Group - Add TempUnit to NaturesCloak_UGrp
          • Custom script: set udg_NaturesCloakId_Integer = GetHandleId(udg_TempUnit)
          • Hashtable - Save (((Real(TempInteger)) x 5.00) + 4.99) as 0 of NaturesCloakId_Integer in Abilities_Hashtable
          • Hashtable - Save Handle OfTempLocation as 1 of NaturesCloakId_Integer in Abilities_Hashtable
          • Hashtable - Save (((Real(TempInteger)) x 25.00) + 25.00) as 2 of NaturesCloakId_Integer in Abilities_Hashtable
          • Trigger - Turn on Natural cloak loop <gen>
        • Else - Actions
  • Natural cloak loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in NaturesCloak_UGrp) Greater than 0
        • Then - Actions
          • Unit Group - Pick every unit in NaturesCloak_UGrp and do (Actions)
            • Loop - Actions
              • Set TempUnit = (Picked unit)
              • Custom script: set udg_NaturesCloakId_Integer = GetHandleId(udg_TempUnit)
              • Set TempReal3 = (Load 0 of NaturesCloakId_Integer from Abilities_Hashtable)
              • Set TempLocation = (Position of TempUnit)
              • Set TempLocation2 = (Load 1 of NaturesCloakId_Integer in Abilities_Hashtable)
              • Set TempReal = (Distance between TempLocation and TempLocation2)
              • Custom script: call RemoveLocation(udg_TempLocation)
              • Set TempReal2 = (Load 2 of NaturesCloakId_Integer from Abilities_Hashtable)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • TempReal Greater than TempReal2
                • Then - Actions
                  • Custom script: call RemoveLocation(udg_TempLocation2)
                  • Unit Group - Remove TempUnit from NaturesCloak_UGrp
                  • Hashtable - Clear all child hashtables of child NaturesCloakId_Integer in Abilities_Hashtable
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • TempReal3 Greater than 0.00
                    • Then - Actions
                      • Hashtable - Save (TempReal3 - 0.03) as 0 of NaturesCloakId_Integer in Abilities_Hashtable
                    • Else - Actions
                      • Custom script: call RemoveLocation(udg_TempLocation2)
                      • Unit Group - Remove TempUnit from NaturesCloak_UGrp
                      • Hashtable - Clear all child hashtables of child NaturesCloakId_Integer in Abilities_Hashtable
        • Else - Actions
          • Game - Display to (All players) for 1.05 seconds the text: |cff2222ffNatural C...
          • Trigger - Turn off (This trigger)
The ability is ready for you to add the invisibilty effect to it.. as far as removing the invisiblity it will auto remove by the duration of the invis spell itself but maybe there are other ways to remove it, maybe with a debuff spell abolish magic or someother? (Edit: if you want the invisibility to stay on even when moving aslong as your in range of trees I will have to change it)
 
Status
Not open for further replies.
Top