HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Rain of Chaos command not working

05-25-2007, 08:46 PM#1
Castlemaster
I'm trying to dummy cast a spell that uses rain of chaos, but for some reason the dummy unit simply will not cast rain of chaos when it's given the order.
Trigger:
Collapse Events
Time - Every 0.50 seconds of game time
Conditions
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
MeteorSwarmTempCount Less than or equal to MeteorSwarmCount[(Level of Meteor Swarm for Elementalist)]
Collapse Then - Actions
Set TempPoint = (MeteorSwarmOrigin offset by 200.00 towards (Random angle) degrees)
Unit - Order MeteorSwarmDummyUnit to Special Archimonde - Rain Of Chaos TempPoint
Custom script: call RemoveLocation (udg_TempPoint)
Set MeteorSwarmTempCount = (MeteorSwarmTempCount + 1)
Collapse Else - Actions
Trigger - Turn off (This trigger)
This trigger is turned on by another trigger activated by the casting of the spell (called meteor swarm). The trigger that turns this one on has all the variables and everything runs smoothly until it get to the "unit - order" line. I've already tested to find that the dummy caster CAN cast the spell, but will not unless I make it selectable and manually cast it.

Thanks ahead of time.
05-25-2007, 08:57 PM#2
Histenchist
Beacuse you turn it off every 0.50 sec of game -.-
05-25-2007, 09:23 PM#3
rulerofiron99
Check the casting time as well.
05-25-2007, 11:07 PM#4
Castlemaster
The IF/THEN/ELSE command is there to make this ability last only as long as the duration, then turn off. You will notice that the MeteorSwarmTempCount is increased once after each spell cast. It's made so that when the duration is up, it will stop casting (turn itself off).

Also the cast time is not interfering. I run tests by making my dummy caster selectable, and when I actually cast his spell, he cast it all as I intended. It's just that when I do nothing and let the triggers run, the dummy unit will do nothing except look useless.
05-25-2007, 11:24 PM#5
Dil999
Trigger:
MeteorSwarmTempCount Less than or equal to MeteorSwarmCount[(Level of Meteor Swarm for Elementalist)]
this looks suspicious..
is MeteorSwarmCount an array? It looks like it because of the [ ]
If so, that doesnt work because you havent given a number to that array, you have to do Less than or equal to Level of Ability for Unit
05-26-2007, 12:00 AM#6
Castlemaster
The array is predefined at map initialization, and has been determined not to be the problem. I've done guess and checking to isolate the problem, and I can 100% say it is in the "Then" statement

Here is the spell preceding it
Trigger:
Meteor Swarm
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Meteor Swarm
Collapse Actions
Set TempPoint = (Target point of ability being cast)
Unit - Create 1 Dummy Caster for (Owner of (Triggering unit)) at TempPoint facing Default building facing degrees
Custom script: call RemoveLocation (udg_TempPoint)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Unit - Add Meteor Swarm (Dummy Ability) to (Last created unit)
Unit - Set level of Meteor Swarm (Dummy Ability) for (Last created unit) to (Level of Meteor Swarm for Elementalist)
Set MeteorSwarmOrigin = (Target point of ability being cast)
Set MeteorSwarmTempCount = 0
Set MeteorSwarmDummyUnit = (Last created unit)
Trigger - Turn on Meteor Swarm Effect <gen>
Custom script: call RemoveLocation (udg_MeteorSwarmOrigin)

and here is a slightly changed spell triggered by it.
Trigger:
Meteor Swarm Effect
Collapse Events
Time - Every 0.50 seconds of game time
Conditions
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
MeteorSwarmTempCount Less than or equal to ((Level of Meteor Swarm for Elementalist) + 3)
Collapse Then - Actions
Set TempPoint = (MeteorSwarmOrigin offset by 200.00 towards (Random angle) degrees)
Unit - Order MeteorSwarmDummyUnit to Special Archimonde - Rain Of Chaos TempPoint
Custom script: call RemoveLocation (udg_TempPoint)
Set MeteorSwarmTempCount = (MeteorSwarmTempCount + 1)
Collapse Else - Actions
Trigger - Turn off (This trigger)

I feel like I'm not giving the right command even though I know for sure that the ability is based on Archimonde's rain of fire.
05-26-2007, 02:48 AM#7
Dil999
Your destroying MeteorSwarmOrigin (the last command in the first trigger) before the second one can do anything with it.
05-26-2007, 03:51 AM#8
Castlemaster
Good Observation, but the trigger still won't fire (once again, I tested to make sure everything else was working) after changing it to this.
Trigger:
Meteor Swarm
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Meteor Swarm
Collapse Actions
Set TempPoint = (Target point of ability being cast)
Unit - Create 1 Dummy Caster for (Owner of (Triggering unit)) at TempPoint facing Default building facing degrees
Custom script: call RemoveLocation (udg_TempPoint)
Set MeteorSwarmDummyUnit = (Last created unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Unit - Add Meteor Swarm (Dummy Ability) to (Last created unit)
Unit - Set level of Meteor Swarm (Dummy Ability) for (Last created unit) to (Level of Meteor Swarm for Elementalist)
Set MeteorSwarmOrigin = (Target point of ability being cast)
Set MeteorSwarmTempCount = 0
Trigger - Turn on Meteor Swarm Effect <gen>
Trigger:
Meteor Swarm Effect
Collapse Events
Time - Every 0.50 seconds of game time
Collapse Conditions
(Current order of Elementalist) Equal to (Order(channel))
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
MeteorSwarmTempCount Less than or equal to ((Level of Meteor Swarm for Elementalist) + 3)
Collapse Then - Actions
Set TempPoint = (MeteorSwarmOrigin offset by 200.00 towards (Random angle) degrees)
Unit - Order MeteorSwarmDummyUnit to Special Archimonde - Rain Of Chaos TempPoint
Custom script: call RemoveLocation (udg_TempPoint)
Set MeteorSwarmTempCount = (MeteorSwarmTempCount + 1)
Collapse Else - Actions
Custom script: call RemoveLocation (udg_MeteorSwarmOrigin)
Trigger - Turn off (This trigger)

The Condition for "Meteor Swarm Effect" is an anti-exploit I put in, and does not effect the execution. I appreciate the observation (that I hoped would have fixed it), but alas, it still won't work.
05-26-2007, 04:35 AM#9
Pyrogasm
First off, the de-leakifying of "MeteorSwarmOrigin" should be outside the if/then/else.

Secondly, why are you using "Last Created Unit" in the first trigger when you set a variable equal to it? Why not just use the variable?
05-26-2007, 04:51 AM#10
Castlemaster
1)If I put the de-leak outside of the IF/THEN/ELSE, then the trigger itself would only run one time since the variable would be destroyed after one use (which would be bad since this trigger is intented to run at least 4 times)

2) I was trying to change things around while trying to figure out the problem and didn't notice that, although that doesn't affect my outcome.

Unfortunately pyro, i need a solution to why the line "order unit" simply will not run