- 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.
Thanks.
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.
I think the problem is this: a unit cannot cast a spell multiple times within a short timespan.
Wait, so 1 unit can cast the same ability n amount of times in a loop?That base assumption is not true.
Wait, so 1 unit can cast the same ability n amount of times in a loop?
Well that's a rather anticlimactic answer. I expected you to come with any proof or something.Yes.
doesn't the caster actually have to turn in order to cast a spell?
Thank you, wonderful test-map.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.
Use trigger-tags:
[trigger]
This is a trigger
Events
Conditions
Actions
[/trigger]
Becomes:
It helps us out a great deal.
- This is a trigger
- Events
- Conditions
- Actions
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
No more of that Dummy_Unit-shenanigans.
- Create dummy unit.
- Add generic expiration timer for (last created unit) for 1.00 seconds
- Order (last created unit) to bloodlust (picked unit)
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).
Please do that, really .Use trigger-tags:
[trigger]
This is a trigger
Events
Conditions
Actions
[/trigger]
Becomes:
It helps us out a great deal.
- This is a trigger
- Events
- Conditions
- Actions
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
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.
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.