• 🏆 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!

Time Freeze spell

Status
Not open for further replies.
Level 7
Joined
Jul 12, 2008
Messages
295
How can i make a time freeze spell that will pause/set animation speed to 0% to all enemy units around. Those units i want them to be invulnerable while paused and my problem is i don't know how to do wait to unpause/set animation speed to 100%. Can some 1 help me?Here are the triggers:

  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Scream of Fear
  • Actions
    • Set Vampire_Fear_Units[1] = (Triggering unit)
    • Set Vampire_Fear_Point[1] = (Position of Vampire_Fear_Units[1])
    • Set Vampire_Fear_Group[1] = (Units within 500.00 of Vampire_Fear_Point[1] matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Magic Immune) Equal to False)) and (((Matching unit) Not equal to Vampire_Fear_Units[1]) and ((((Matching unit) is alive) Equal
    • Unit Group - Pick every unit in Vampire_Fear_Group[1] and do (Actions)
      • Loop - Actions
        • Unit - Pause (Picked unit)
        • Animation - Change (Picked unit)'s animation speed to 0.00% of its original speed
        • Unit - Create 1 Scream of Fear Dummy for (Owner of Vampire_Fear_Units[1]) at Vampire_Fear_Point[1] facing Default building facing degrees
        • Set Vampire_Fear_Units[2] = (Last created unit)
        • Unit - Add Scream of Fear (Sleep) to Vampire_Fear_Units[2]
        • Unit - Set level of Scream of Fear (Sleep) for Vampire_Fear_Units[2] to (Level of Scream of Fear for Vampire_Fear_Units[1])
        • Unit - Order Vampire_Fear_Units[2] to Undead Dreadlord - Sleep (Picked unit)
        • Unit - Add a 1.00 second Generic expiration timer to Vampire_Fear_Units[2]
        • Set Vampire_Fear_Units[3] = (Picked unit)
        • Unit Group - Add (Picked unit) to Vampire_Fear_Group[2]
    • Wait until ((Vampire_Fear_Units[3] has buff Scream of Fear (3) ) Equal to False), checking every 0.10 seconds
    • Unit Group - Pick every unit in Vampire_Fear_Group[2] and do (Actions)
      • Loop - Actions
        • Unit - Unpause (Picked unit)
        • Animation - Change (Picked unit)'s animation speed to 100.00% of its original speed
    • Unit Group - Remove all units from Vampire_Fear_Group[1]
    • Unit Group - Remove all units from Vampire_Fear_Group[2]
    • Custom script: call DestroyGroup(udg_Vampire_Fear_Group[1])
    • Custom script: call DestroyGroup(udg_Vampire_Fear_Group[2])
    • Custom script: call RemoveLocation(udg_Vampire_Fear_Point[1])
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
If you want to do this in GUI i recommend you this 2 triggers:

  • Time Stop 1
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to YourAbility
    • Actions
      • -------- I'm assuming that you have made buff for time stop --------
      • -------- The buff MUST have duration --------
      • -------- For this trigger you need 2 group variables and 1 location (point) --------
      • Set TempPoint = (Position of (Triggering unit))
      • Set TempGroup = (Units within 500.00 of TempPoint matching (YourConditions)
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • -------- You pause actions here --------
          • -------- And animation set to 0% --------
      • Unit Group - Add all units of TempGroup to PauseGroup
      • Custom script: call DestroyGroup(udg_TempGroup)
      • -------- Add this for better preformance --------
      • -------- Its not necessary --------
      • Trigger - Turn on Time Stop 2 <gen>
  • Time Stop 2
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • -------- This trigger unpauses units --------
      • -------- by checking if they have pause buff --------
      • Unit Group - Pick every unit in PauseGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff YourBuff) Not equal to True
            • Then - Actions
              • -------- Unpause unit and return its animation speed --------
              • Unit Group - Remove (Picked unit) from PauseGroup
            • Else - Actions
      • -------- Preformance increase --------
      • -------- You don't have to add this into your trigger --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in PauseGroup) Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
 
Level 7
Joined
Jul 12, 2008
Messages
295
Well thanks. I'll try it and reply here. Thanks for your help. But 1 problem still remains, because i want the paused units to be invulnerable. If the units have invulnerable they remove all buffs from them so i rly don't know how to fix that. Can u tell me how to solve this problem?
 
Level 7
Joined
Jul 12, 2008
Messages
295
Problem here, child need help man... The spell pauses/sets animation speed to 0 and all but the stun buff lasts like forever. Why is that? I set the duration to 3/5/7 for units 3/5/7 for heroes. Help please
 
Level 7
Joined
Jul 12, 2008
Messages
295
Thanks for the help m8. Wanna add to friends? Do you have MSN/Skype or something so we can talk?
 
Status
Not open for further replies.
Top