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

Little help with a freezing time spell

Status
Not open for further replies.
Level 6
Joined
Jul 17, 2008
Messages
185
Ok...

What im trying to do its an ability that makes units near the dude who has it freeze for a certain time after the dude gets killed but i think im thinking wrong here :S

heres the trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Priest With Super Fucking Awsome Powers
    • Actions
      • Unit Group - Pick every unit in (Units in ((Region centered at (Position of (Triggering unit)) with size (1000.00, 1000.00)) offset by (0.00, 0.00))) and do (Actions)
        • Loop - Actions
          • Unit - Pause (Picked unit)
          • Animation - Change (Picked unit)'s animation speed to 0.00% of its original speed
          • Unit Group - Add (Picked unit) to Dudesafected
      • Unit - Create 1 DUMA for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
      • Unit - Add Time MagicOFF to (Last created unit)
      • Wait 4.00 seconds
      • Unit Group - Pick every unit in Dudesafected and do (Actions)
        • Loop - Actions
          • Unit - Unpause (Picked unit)
      • Unit Group - Pick every unit in Dudesafected and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Time WarpOFF ) Equal to False
            • Then - Actions
              • Animation - Change (Picked unit)'s animation speed to 100.00% of its original speed
            • Else - Actions
              • Unit - Pause (Picked unit)
Ok so.. the DUMA unit its a unit i made with no model with 4 life and life regen -1 (so it works like a timer) to give a buff so i can control when the units stop behing frozen

but i think it doesnt work because the aura buff doesnt instantly disapears when the aura stops behing in range

Help pls
 
Level 8
Joined
Mar 12, 2008
Messages
437
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Priest With Super Fucking Awsome Powers
    • Actions
      • Set POINT = (Position of (Triggering unit))
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in ((Region centered at POINT with size (1000.00, 1000.00)) offset by (0.00, 0.00))) and do (Actions)
        • Loop - Actions
          • Unit - Pause (Picked unit)
          • Animation - Change (Picked unit)'s animation speed to 0.00% of its original speed
          • Unit Group - Add (Picked unit) to Dudesafected
      • Unit - Create 1 DUMA for (Owner of (Triggering unit)) at POINT facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_POINT)
      • Unit - Add Time MagicOFF to (Last created unit)
      • Wait 4.00 seconds
      • Unit Group - Pick every unit in Dudesafected and do (Actions)
        • Loop - Actions
          • Unit - Unpause (Picked unit)
          • Unit - Remove Time WarpOFF buff from (Picked unit)
      • Unit Group - Pick every unit in Dudesafected and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Time WarpOFF ) Equal to False
            • Then - Actions
              • Animation - Change (Picked unit)'s animation speed to 100.00% of its original speed
            • Else - Actions
              • Unit - Pause (Picked unit)
      • Unit Group - Pick all unit in dudesafected and do (Actions)
        • Unit - Remove from dudesafected
I think this should do it. I also fixed some leaks.
 
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

You use only one Priest with Super bla bla. If yes the struct is ok, if you use more of them it can be a total fail.

In addition:
1) The first "Unit Group - Pick every ...." picks everything: ally units - structures - dead units - alive units - maybe you should add some conditions?

2) And what the hell you use after the wait. You pick every unit in this group - remove this buff and unpause them then you pick this units again and check if the don't have this buff ( OFC they have not because you removed it!) and else pause them again) So if they have the buff (what is impossible) they are paused for ever? and then you pick again each unit in this unit group and remove them. ( And you forget to destroy this unit group )

Edit: Delete Point 3 <-- sorry somehow I didn't notice that
 
Last edited:
Level 8
Joined
Mar 12, 2008
Messages
437
Seas =)

You use only one Priest with Super bla bla. If yes the struct is ok, if you use more of them it can be a total fail.

In addition:
1) The first "Unit Group - Pick every ...." picks everything: ally units - structures - dead units - alive units - maybe you should add some conditions?

2) And what the hell you use after the wait. You pick every unit in this group - remove this buff and unpause them then you pick this units again and check if the don't have this buff ( OFC they have not because you removed it!) and else pause them again) So if they have the buff (what is impossible) they are paused for ever? and then you pick again each unit in this unit group and remove them. ( And you forget to destroy this unit group )

3) And this dummy will stand for ever one the map. You should remove the dummy to

1. Yes
2. I didn't feel like removing the actions, for some reason. I'm a little unexperienced when it comes to destroying. Some leaks destroy things permanently and others don't, and I've got a little trouble remembering which. I'm removing the units from the group because I want to empty it.
3. rofl no, it has 4hp and a regeneration of -1 hp/s, which results in the Dummy staying for only 4 seconds. Read the thread before you post.

Shiroaisu: It removes a leak. If you don't know what a leak is, I think it's in this forum.
 
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

This destroy a unit group leak. Before you write "Unit Group - Pick every ..." you need to type this.

BUT: If you pick units from a unit group ( you got this unit group for example: dudesafected ) you need to use ( at the end of the trigger ):

  • Custom script: call DestroyGroup(udg_dudesafected)
Edit: No ... it not a fault ... I was wondering why you not use:

  • TestTrigger
    • Events:
    • Conditions:
    • Actions:
      • Wait 4.00 seconds
      • Unit Group - Pick every unit in Dudesafected and do (Actions)
        • Loop - Actions:
          • Unit - Unpause (Picked unit)
          • Unit - Remove Time WarpOFF buff from (Picked unit)
          • Animation - Change (Picked unit)'s animation speed to 100.00% of its original speed
          • Unit - Remove (Picked Unit)from dudesafected
          • Custom script: call DestroyGroup(udg_dudesafected)
Hmm I don't know if you need to remove the unit first, if you destroy the full group anyway =O
 
Level 6
Joined
Jul 17, 2008
Messages
185
That trigger has the same problem I had with my original one :(

Ill try to explain better using the image attached to this post:

1 and 2 are priest, 3 is like a footman or whatever...

Wen the priest 1 dies th unit 3 gets frozen BUT if the other priest die 2 secs latter the footman will only be stopped for 2 more seconds and it was suposed to restart the timer for that footman secs freeze...

so it doesnt help :S

help plss
 

Attachments

  • Sem título.jpg
    Sem título.jpg
    13.4 KB · Views: 90
Status
Not open for further replies.
Top