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

Spell Help?

Status
Not open for further replies.
Level 5
Joined
Jul 31, 2004
Messages
108
I'm new to this thing and if this seems n00b don't make fun please. Now I am having trouble at the

For each (Integer A) from 1 to 5, do (Actions)
Loop - Actions
For each (Integer B) from 1 to 10, do (Actions)
Loop - Actions
Unit - Order Abilites_Unit_1[(Integer B)] to Human Paladin - Holy Light (Random unit from Abilites_UnitG_1)

part it casts it, but not on all the units....how do I make it so it cast Holy Light on the all the units in the Unit Group over a 5 second period??

Trigger-

Holy Light Storm
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to Holy Light Storm (S)
((Triggering unit) is A Hero) Equal to True
Actions
Region - Center Region 000 <gen> on (Position of (Casting unit))
Unit Group - Add all units of (Units within 800.00 of (Center of Region 000 <gen>)) to Abilites_UnitG_1
Unit Group - Remove (Casting unit) from Abilites_UnitG_1
Unit - Create 1 BLAHSSS for (Triggering player) at (Position of (Casting unit)) facing 90.00 degrees
Set Abilites_Unit_1[1] = (Last created unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Unit - Create 1 BLAHSSS for (Triggering player) at (Position of (Casting unit)) facing 90.00 degrees
Set Abilites_Unit_1[2] = (Last created unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Unit - Create 1 BLAHSSS for (Triggering player) at (Position of (Casting unit)) facing 90.00 degrees
Set Abilites_Unit_1[3] = (Last created unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Unit - Create 1 BLAHSSS for (Triggering player) at (Position of (Casting unit)) facing 90.00 degrees
Set Abilites_Unit_1[4] = (Last created unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Unit - Create 1 BLAHSSS for (Triggering player) at (Position of (Casting unit)) facing 90.00 degrees
Set Abilites_Unit_1[5] = (Last created unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Unit - Create 1 BLAHSSS for (Triggering player) at (Position of (Casting unit)) facing 90.00 degrees
Set Abilites_Unit_1[6] = (Last created unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Unit - Create 1 BLAHSSS for (Triggering player) at (Position of (Casting unit)) facing 90.00 degrees
Set Abilites_Unit_1[7] = (Last created unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Unit - Create 1 BLAHSSS for (Triggering player) at (Position of (Casting unit)) facing 90.00 degrees
Set Abilites_Unit_1[8] = (Last created unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Unit - Create 1 BLAHSSS for (Triggering player) at (Position of (Casting unit)) facing 90.00 degrees
Set Abilites_Unit_1[8] = (Last created unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Unit - Create 1 BLAHSSS for (Triggering player) at (Position of (Casting unit)) facing 90.00 degrees
Set Abilites_Unit_1[9] = (Last created unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Unit - Create 1 BLAHSSS for (Triggering player) at (Position of (Casting unit)) facing 90.00 degrees
Set Abilites_Unit_1[10] = (Last created unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
For each (Integer A) from 1 to 5, do (Actions)
Loop - Actions
For each (Integer B) from 1 to 10, do (Actions)
Loop - Actions
Unit - Order Abilites_Unit_1[(Integer B)] to Human Paladin - Holy Light (Random unit from Abilites_UnitG_1)
 
Level 12
Joined
Apr 29, 2005
Messages
999
You don't need to have such much text in your trigger. Here try this instead I think it should work.


Holy Light Storm
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Holy Light Storm
Actions
For each (Integer A) from 1 to 5, do (Actions)
Loop - Actions
Unit Group - Pick every unit in (Units within 700.00 of (Target point of ability being cast)) and do (Actions)
Loop - Actions
Unit - Create 1 Holy Light Dummy for (Owner of (Casting unit)) at (Target point of ability being cast) facing Default building facing degrees
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Human Paladin - Holy Light (Picked unit)
Wait 1.00 seconds

As you see this trigger does not save all units that are to be affected in a variable. It uses the function "Pick every unit" instead. Always use this function when you make spells that affects lots of units. :wink:
 
Status
Not open for further replies.
Top