• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Acid rain help

Status
Not open for further replies.
Level 5
Joined
Jun 22, 2004
Messages
109
hey guys, ive been busy trying to make my abilities, n e ways i made an acid rain ability, basically the ability creates dummy units attacking ground in random spots in a region, then its supposed to make another dummy at that specific point, this second dummy is supposed to cast shadow strike on any nearby units withing 110 range. but it doesnt work, can n e 1 help me out?

Heres the code:

Events

Unit - A unit Begins casting an ability

Conditions
(Ability being cast) Equal to Acid Rain

Actions
Region - Center Acid rain <gen> on (Target point of ability being cast)
For each (Integer B) from 1 to 60, do (Actions)
Loop - Actions
Unit - Create 1 Acid Rain Projectile for (Owner of (Casting unit)) at (Random point in Acid rain <gen>) facing Default building facing degrees
Unit - Order (Last created unit) to Attack Ground (Random point in Acid rain <gen>)
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Wait 0.30 seconds
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Issued order) Equal to (Order(Attack Ground))
Then - Actions
Unit Group - Pick every unit in (Units within 110.00 of (Target point of issued order) matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True)) and do (Actions)
Loop - Actions
Unit - Create 1 Acid Rain Dummy for (Owner of (Casting unit)) at (Target point of issued order) facing (Position of (Triggering unit))
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Night Elf Warden - Shadow Strike (Picked unit)
Else - Actions
Do nothing
 
Level 6
Joined
Dec 13, 2004
Messages
320
Hello!

your mistake is in this line:

(Issued order) Equal to (Order(Attack Ground))

The (Issued order) is for when the triggers event is 'Unit - A is issued an order' you cant use it if your event is 'Unit - A unit Begins casting an ability'

You might be able to make it a new trigger but you would have to give it a condition so that it will only run when your dummy unit attacks ground and not any other unit.

Hope this helps.
 
Level 5
Joined
Jun 22, 2004
Messages
109
ok i tried what u said, but once it hit one target with the shadow strike, it would stop casting the ability, and only create 1 unit at a point hitting one target without any effect. here are the 2 codes i came up with:

Code 1

Acid Rain
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Acid Rain
Actions
Region - Center Acid rain <gen> on (Target point of ability being cast)
For each (Integer B) from 1 to 60, do (Actions)
Loop - Actions
Unit - Create 1 Acid Rain Projectile for (Owner of (Casting unit)) at (Random point in Acid rain <gen>) facing Default building facing degrees
Set Poison = (Unit-type of (Last created unit))
Unit - Order (Last created unit) to Attack Ground (Random point in Acid rain <gen>)
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Wait 0.30 seconds

Code 2

Acid rain poison
Events
Unit - A unit Is issued an order targeting a point
Conditions
(Issued order) Equal to (Order(Attackground))
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in (Units within 50.00 of (Position of (Last created unit)))) Equal to 1
Then - Actions
Unit Group - Pick every unit in (Units within 50.00 of (Target point of issued order) matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True)) and do (Actions)
Loop - Actions
Unit - Create 1 Acid Rain Dummy for (Owner of (Triggering unit)) at (Target point of issued order) facing (Position of (Triggering unit))
Set Poisonsting = (Unit-type of (Last created unit))
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Night Elf Warden - Shadow Strike (Picked unit)
Else - Actions
Unit - Remove (Last created unit) from the game


plz help me out.
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
1.Use An Unit Starts the effect of an Ability and not An Unit Being Casting an Ability.

2.I'm also not sure if Casting Unit doesn't reset after waits. Better use Triggering Unit (in the first trigger in the loop).

3.For the conditions of the second trigger, they might get buggy since it will fire anytime an unit is issued an order equal to Attackground. Better add as well the condition

UnitType of (Triggering Unit) equal to Poison (you have this variable to which you gave a value in the first trigger).

Hope that once you solve all these bugs the spell will work. :wink:

~Daelin
 
Level 5
Joined
Jun 22, 2004
Messages
109
ok i got it to work somewhat, but there are still some bugs that occur, tho it doesnt make sense why they do. Basically when the acid projectile (unit attacks ground) hist an enemy it does cast shadow strike, but it instantly kills the units for some reason, i did set the shadow strike dummy ability to do no initial damage and only to do 10 damage per second for 10 seconds. also after the ability is done being cast, some Acid projectiles stay there and keep attacking ground, duno why that happens. so can u guys re review my code again and see whats wrong. (sry guys, if u want i can send u the ability by email just pm if u like to help, if u can help through the forum then by all means plz help) heres my code now:

trigger 1

Acid Rain
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Acid Rain
Actions
Region - Center Acid rain <gen> on (Target point of ability being cast)
For each (Integer B) from 1 to 60, do (Actions)
Loop - Actions
Unit - Create 1 Acid Rain Projectile for (Owner of (Triggering unit)) at (Random point in Acid rain <gen>) facing Default building facing degrees
Unit - Order (Last created unit) to Attack Ground (Random point in Acid rain <gen>)
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Wait 0.30 seconds
Set Poison = (Unit-type of (Last created unit))

Trigger 2

Acid Rain
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Acid Rain
Actions
Region - Center Acid rain <gen> on (Target point of ability being cast)
For each (Integer B) from 1 to 60, do (Actions)
Loop - Actions
Unit - Create 1 Acid Rain Projectile for (Owner of (Triggering unit)) at (Random point in Acid rain <gen>) facing Default building facing degrees
Unit - Order (Last created unit) to Attack Ground (Random point in Acid rain <gen>)
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Wait 0.30 seconds
Set Poison = (Unit-type of (Last created unit))


thx a lot for ur help guys.
 
Level 6
Joined
Feb 4, 2005
Messages
302
trigger 1

Acid Rain
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Acid Rain
Actions
Region - Center Acid rain <gen> on (Target point of ability being cast)
For each (Integer B) from 1 to 60, do (Actions)
Loop - Actions
Unit - Create 1 Acid Rain Projectile for (Owner of (Triggering unit)) at (Random point in Acid rain <gen>) facing Default building facing degrees
Unit - Order (Last created unit) to Attack Ground (Random point in Acid rain <gen>)
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Wait 0.30 seconds
Set Poison = (Unit-type of (Last created unit))

Trigger 2

Acid Rain
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Acid Rain
Actions
Region - Center Acid rain <gen> on (Target point of ability being cast)
For each (Integer B) from 1 to 60, do (Actions)
Loop - Actions
Unit - Create 1 Acid Rain Projectile for (Owner of (Triggering unit)) at (Random point in Acid rain <gen>) facing Default building facing degrees
Unit - Order (Last created unit) to Attack Ground (Random point in Acid rain <gen>)
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Wait 0.30 seconds
Set Poison = (Unit-type of (Last created unit))

But it looks EXACTLY the same!
 
Level 5
Joined
Jun 22, 2004
Messages
109
oops my bad heres the second trigger...lol

Trigger 2

Acid rain poison
Events
Unit - A unit Is issued an order targeting a point
Conditions
(Issued order) Equal to (Order(Attackground))
(Unit-type of (Triggering unit)) Equal to Poison
Actions
Unit Group - Pick every unit in (Units within 90.00 of (Target point of issued order) matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True)) and do (Actions)
Loop - Actions
Unit - Create 1 Acid Rain Dummy for (Owner of (Triggering unit)) at (Target point of issued order) facing (Position of (Triggering unit))
Set Poisonsting = (Unit-type of (Last created unit))
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Night Elf Warden - Shadow Strike (Picked unit)

Can n e 1 help out??? it still dont work, it instantly kills the unit for some reason, and the (attacking unit) doesnt disappear after the spell has been casted. plz help me out
 
Status
Not open for further replies.
Top