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

PALA Ressurection - Targets

Status
Not open for further replies.
Level 2
Joined
Mar 1, 2010
Messages
12
How can I pick targets of spell? I wanna pick all ressureected units by this spell and give them Bloodlust. (I need to know only how to pick them)

Thanks.
 
It's impossible through normal ways, you will have to do it in a very hard mechanic: make random 6 corpse to be removed and create new units of the same type, which is going to force you to make the spell an area spell or such, so you could stop the caster and give the order to stop + massage "no corpse was found", unless you do it like this, you will lose mana and cooldown for tring, which is totaly a bomer (I made spell like that also).
 
Level 2
Joined
Mar 1, 2010
Messages
12
Ehm. Not easy as I though. I made some triger, but it is works only on 90%.

Ressurection
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Resurrection
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Resurrection for (Casting unit)) Equal to 2
Then - Actions
Set Ressurection_Caster = (Position of (Casting unit))
Set Ressurection_Group = (Random 6 units from (Units within 1800.00 of Ressurection_Caster matching ((((Matching unit) is dead) Equal to True) and (((Matching unit) belongs to an ally of (Owner of (Casting unit))) Equal to True))))
Unit Group - Pick every unit in Ressurection_Group and do (Actions)
Loop - Actions
Set Ressurection_Unit_Type = (Unit-type of (Picked unit))
Unit - Create 1 Ressurection_Unit_Type for (Owner of (Casting unit)) at (Position of (Picked unit)) facing Default building facing degrees
Unit - Order Dummy_Unit to Orc Shaman - Bloodlust (Last created unit)
Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\Resurrect\ResurrectTarget.mdl
Special Effect - Destroy (Last created special effect)
Unit - Remove (Picked unit) from the game
Else - Actions
Do nothing
Custom script: call RemoveLocation (udg_Ressurection_Caster)
Custom script: call DestroyGroup (udg_Ressurection_Group)

I don't know why, because I think this is made good, but Bloodlust have just one of ressurected unit. Dunno why.

Thanks for helping me.
 
Ehm. Not easy as I though. I made some triger, but it is works only on 90%.

Ressurection
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Resurrection
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Resurrection for (Casting unit)) Equal to 2
Then - Actions
Set Ressurection_Caster = (Position of (Casting unit))
Set Ressurection_Group = (Random 6 units from (Units within 1800.00 of Ressurection_Caster matching ((((Matching unit) is dead) Equal to True) and (((Matching unit) belongs to an ally of (Owner of (Casting unit))) Equal to True))))
Unit Group - Pick every unit in Ressurection_Group and do (Actions)
Loop - Actions
Set Ressurection_Unit_Type = (Unit-type of (Picked unit))
Unit - Create 1 Ressurection_Unit_Type for (Owner of (Casting unit)) at (Position of (Picked unit)) facing Default building facing degrees
Unit - Order Dummy_Unit to Orc Shaman - Bloodlust (Last created unit)
Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\Resurrect\ResurrectTarget.mdl
Special Effect - Destroy (Last created special effect)
Unit - Remove (Picked unit) from the game
Else - Actions
Do nothing
Custom script: call RemoveLocation (udg_Ressurection_Caster)
Custom script: call DestroyGroup (udg_Ressurection_Group)

I don't know why, because I think this is made good, but Bloodlust have just one of ressurected unit. Dunno why.

Thanks for helping me.

If you don't mind posting the map here, (or atlist just the trigger with another map) I could fix it. EDIT: Also, since I dont see anything weird in the triggers, make sure that the dummy units are unable to drop corpse, else they might be choosen for the revive.
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
Another way with less triggers:

Use Animate Dead as base spell and set the duration to 0 (and all the other fields you want different).
Animate Dead gives an invisible buff for which you can check easily.
Add each unit with the buff to your unitgroup and after that remove the buff (this will also remove the dark color on resurrected units).
 
Level 2
Joined
Mar 1, 2010
Messages
12
If you don't mind posting the map here, (or atlist just the trigger with another map) I could fix it. EDIT: Also, since I dont see anything weird in the triggers, make sure that the dummy units are unable to drop corpse, else they might be choosen for the revive.

Revive works great. Units are ressurected, but only one of them had Bloodlust.
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
As you dont post the map I can only give general hints.

Be sure that all of the following requirements are met:
-dummy caster has cast point, cast backswing and movementspeed of 0
-the bloodlust ability has a cooldown and manacost of 0 and enough range
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Use trigger-tags:

[trigger]
This is a trigger
Events
Conditions
Actions
[/trigger]

Becomes:
  • This is a trigger
    • Events
    • Conditions
    • Actions
It helps us out a great deal.


I think the problem is this: a unit cannot cast a spell multiple times within a short timespan.
Since those actions loop, Dummy_Unit only gets like 0.001 second to cast a spell on 6 targets. As this is impossible, it will only target 1 of those units.
You have to create a dummy inside the loop and order that dummy to bloodlust the units.
So here are the steps
  • Create dummy unit.
  • Add generic expiration timer for (last created unit) for 1.00 seconds
  • Order (last created unit) to bloodlust (picked unit)
No more of that Dummy_Unit-shenanigans.


Few more tips:
1) You leak a location (you set the variable correctly, but you didn't actually use it).
2) Never use the "Do Nothing"-action. It's a retarded action (silly Blizzard).
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
That base assumption is not true.
Wait, so 1 unit can cast the same ability n amount of times in a loop?
That has never happened for me, therefore I concluded that it must be correct.

Of course, a unit can cast it within 'a short timespan', as long as there is an actual timespan (like half a second or something).
That isn't exactly what I meant (which I explain later in the post).
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Well that's a rather anticlimactic answer. I expected you to come with any proof or something.

I've actually tested this with instant-abilities and it doesn't even work very well with a periodic timer, let alone in a loop.
When using every 0.01 seconds, the unit cast an instant spell every 0.02 seconds. If it cannot handle that, it certainly cannot handle a loop.

Besides, with target-abilities: doesn't the caster actually have to turn in order to cast a spell? It really doesn't have any chance to do that in a loop.
I stick with it: there's no way 1 unit can cast a target-spell at 6 different units in a loop. Unless you can prove me wrong, of course. You have to create 1 dummy per target to do this.
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
doesn't the caster actually have to turn in order to cast a spell?

Normal units yes, because of that we use movementspeed of 0. This way the unit wont have the Amov ability and wont have to turn for casting.
 

Attachments

  • bloodlust.w3x
    16.7 KB · Views: 63
Level 28
Joined
Jan 26, 2007
Messages
4,789
Normal units yes, because of that we use movementspeed of 0. This way the unit wont have the Amov ability and wont have to turn for casting.
Thank you, wonderful test-map.
By the way, if you haven't noticed: it's International Skeptics Day. The test-map is wonderful and clears my suspicion, except for one thing: he probably didn't use that trick (why else would it fail?).
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
Well I guess he didnt set one of those numbers to 0 but lets observe this skeptical until he and his answer return! :)
 
Level 2
Joined
Mar 1, 2010
Messages
12
Use trigger-tags:

[trigger]
This is a trigger
Events
Conditions
Actions
[/trigger]

Becomes:
  • This is a trigger
    • Events
    • Conditions
    • Actions
It helps us out a great deal.


I think the problem is this: a unit cannot cast a spell multiple times within a short timespan.
Since those actions loop, Dummy_Unit only gets like 0.001 second to cast a spell on 6 targets. As this is impossible, it will only target 1 of those units.
You have to create a dummy inside the loop and order that dummy to bloodlust the units.
So here are the steps
  • Create dummy unit.
  • Add generic expiration timer for (last created unit) for 1.00 seconds
  • Order (last created unit) to bloodlust (picked unit)
No more of that Dummy_Unit-shenanigans.


Few more tips:
1) You leak a location (you set the variable correctly, but you didn't actually use it).
2) Never use the "Do Nothing"-action. It's a retarded action (silly Blizzard).

I made it this way. And bloodlust now works on 5 from 6 units. :D

Ressurection
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Resurrection
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Resurrection for (Casting unit)) Equal to 2
Then - Actions
Set Ressurection_Caster = (Position of (Casting unit))
Set Ressurection_Group = (Random 6 units from (Units within 1800.00 of Ressurection_Caster matching ((((Matching unit) is dead) Equal to True) and (((Matching unit) belongs to an ally of (Owner of (Casting unit))) Equal to True))))
Unit Group - Pick every unit in Ressurection_Group and do (Actions)
Loop - Actions
Set Ressurection_Point = (Position of (Picked unit))
Set Ressurection_Unit_Type = (Unit-type of (Picked unit))
Unit - Remove (Picked unit) from the game
Unit - Create 1 Ressurection_Unit_Type for (Owner of (Casting unit)) at Ressurection_Point facing Default building facing degrees
Set Ressurection_Unit = (Last created unit)
Special Effect - Create a special effect attached to the origin of Ressurection_Unit using Abilities\Spells\Human\Resurrect\ResurrectTarget.mdl
Special Effect - Destroy (Last created special effect)
Unit - Create 1 Dummy for (Owner of (Casting unit)) at Ressurection_Point facing Default building facing degrees
Set Ressurection_Dummy = (Last created unit)
Unit - Order Ressurection_Dummy to Orc Shaman - Bloodlust Ressurection_Unit
Unit - Add a 1.00 second Generic expiration timer to Ressurection_Dummy
Else - Actions
Custom script: call RemoveLocation (udg_Ressurection_Caster)
Custom script: call RemoveLocation (udg_Ressurection_Point)
Custom script: call DestroyGroup (udg_Ressurection_Group)
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Use trigger-tags:

[trigger]
This is a trigger
Events
Conditions
Actions
[/trigger]

Becomes:
  • This is a trigger
    • Events
    • Conditions
    • Actions
It helps us out a great deal.
Please do that, really :p.

  • Ressurection
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Resurrection
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Resurrection for (Casting unit)) Equal to 2
        • Then - Actions
          • Set Ressurection_Caster = (Position of (Casting unit))
          • Set Ressurection_Group = (Random 6 units from (Units within 1800.00 of Ressurection_Caster matching ((((Matching unit) is dead) Equal to True) and (((Matching unit) belongs to an ally of (Owner of (Casting unit))) Equal to True))))
          • Unit Group - Pick every unit in Ressurection_Group and do (Actions)
            • Loop - Actions
              • Set Ressurection_Point = (Position of (Picked unit))
              • Set Ressurection_Unit_Type = (Unit-type of (Picked unit))
              • Unit - Remove (Picked unit) from the game
              • Unit - Create 1 Ressurection_Unit_Type for (Owner of (Casting unit)) at Ressurection_Point facing Default building facing degrees
              • Set Ressurection_Unit = (Last created unit)
              • Special Effect - Create a special effect attached to the origin of Ressurection_Unit using Abilities\Spells\Human\Resurrect\ResurrectTarget.mdl
              • Special Effect - Destroy (Last created special effect)
              • Unit - Create 1 Dummy for (Owner of (Casting unit)) at Ressurection_Point facing Default building facing degrees
              • Set Ressurection_Dummy = (Last created unit)
              • Unit - Order Ressurection_Dummy to Orc Shaman - Bloodlust Ressurection_Unit
              • Unit - Add a 1.00 second Generic expiration timer to Ressurection_Dummy
        • Else - Actions
      • Custom script: call RemoveLocation (udg_Ressurection_Caster)
      • Custom script: call RemoveLocation (udg_Ressurection_Point)
      • Custom script: call DestroyGroup (udg_Ressurection_Group)
It's strange that it doesn't bloodlust all units. I mean, you create a dummy per unit (which is apparently not really needed, as Ezekiel rightfully corrected me) and order each dummy to target each unit.
Would you be willing to upload the map so I can try and debug it, see what's going wrong?

(1 small leak-mistake: the variable "Ressurection_Point" should be removed inside the loop-actions, not at the end of the trigger).
 
Level 2
Joined
Mar 1, 2010
Messages
12
I have another problem. Units which get Bloodlust have bad buff. I made my own ability from bloodlust so as I created buff for this spell with custom name, icon etc. But they have classic bloodlust buff. Dunno why?

PS: Sorry for my English. I hope you understand me. :D :)

EDIT: Solved. (Mistake in Object Editor)
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
About the spell "Holy Light", do you realize you could just do "150 * (level of Holy Light)" instead of all those ITE's?
(Also, remove "Do Nothing").

About Resurrection: the spell does work, all units get bloodlust.
The Spell Breaker just has magic immunity, so he cannot be targeted by bloodlust :p
 
Level 2
Joined
Mar 1, 2010
Messages
12
About the spell "Holy Light", do you realize you could just do "150 * (level of Holy Light)" instead of all those ITE's?
(Also, remove "Do Nothing").

About Resurrection: the spell does work, all units get bloodlust.
The Spell Breaker just has magic immunity, so he cannot be targeted by bloodlust :p

Thanks. About Holy Light. Yes you're right, but I haven't that good idea as you. :D Magic Immunity.. sh*t. Thanks :)
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
The Spell Breaker just has magic immunity, so he cannot be targeted by bloodlust

Easy solution:
Set the field 'Stats - Hero Ability' to true and after that set 'Stats - Required Level' to 2.
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
What? there is a way to put bloodlust on magic immune? please explain it.

The game considers everything with a required level higher than 1 as ultimate.
Ultimates are able to target magic immune units.
There are some exceptions though that can target magic immunes independant from their required level.
 
The game considers everything with a required level higher than 1 as ultimate.
Ultimates are able to target magic immune units.
There are some exceptions though that can target magic immunes independant from their required level.

Press esc to cast global
why isnt this working -_-
Edit: Inner Fire for the Blood Elves! -> fixed, I got confused between "required level" and "required tech level"
 

Attachments

  • Press esc to cast global.w3x
    16.9 KB · Views: 105
  • Inner Fire for the Blood Elves!.w3x
    17 KB · Views: 57
Status
Not open for further replies.
Top