HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Rain of Choas(spell) Question

02-15-2006, 06:54 PM#1
Erdrik
I was wondering if it possible to detect the ability that Rain of Chaos is set to cast? something like:
Code:
Event
Unit - A unit Starts the effect of an ability
Condition
(Ability being cast) Equal to Rain of Chaos
Actions
set AbilityVariable = (Ability being cast)

only instead of (Ability being cast) it would be the ability that Rain of Chaos is casting...

I want to do it this way so that I don't have to make a trigger for each spell. Instead I would just make a bunch of custom Rain of Chaos's with different abilities, detect them with this trigger then make a dummy unit to cast the detected ability multiple times... I am of course talking about non-summoning abilities..
02-15-2006, 06:57 PM#2
Captain Griffen
I was under the impression rain of chaos only worked for summoning spells?
02-15-2006, 07:01 PM#3
Erdrik
Quote:
Originally Posted by Captain Griffen
I was under the impression rain of chaos only worked for summoning spells?
You are correct it does not cast non summoning spells. But I can still select non summoning spells as the ability in the editor. I wanted to know if there was a way to detect this, set it to a variable and then cast the ability set in the variable.
02-15-2006, 07:07 PM#4
Captain Griffen
You could just use a dummy summoning ability and detect the summon.
02-15-2006, 07:56 PM#5
Erdrik
Quote:
Originally Posted by Captain Griffen
You could just use a dummy summoning ability and detect the summon.
errr no, that wouldn't work. the whole point is to make only one trigger that will cast all spells used this way.
your suggestion would require multiple tiggers(or if/then's) for each dummy summon.

I want to set a variable to the ability within Rain of Chaos, then cast the variable.
02-15-2006, 08:07 PM#6
Captain Griffen
Well can you get something via the <A001:ABca,DataA1> in triggers? If so, theoretically you could get the ability from the relevent data field. Otherwise, I don't think it can be done, expect by an array of summons and abilities, or something of that nature.
02-15-2006, 09:17 PM#7
Erdrik
Only thing I could find in GUI was ability name, ability art(all types caster effects, lightning, ect) and ability sound.
I don't know if there are any in JASS tho?
02-15-2006, 09:33 PM#8
Captain Griffen
You gotta look at the raw data. Shift-d or something.
02-15-2006, 09:51 PM#9
Erdrik
...
...
I already know about that.
I mean that there are no actions in the triggers that are involved with the settings in abilities other than name art and sound. Knowing the raw data won't help me if there are no GUI trigger events, conditions, or actions pointing to them. ...

That is why I asked if there were any JASS functions that are capable of useing data settings in abilities
02-15-2006, 09:54 PM#10
Captain Griffen
It would give you an ability, theoretically, for the correct field. I don't know if it is possible, hence why I asked.
02-15-2006, 10:26 PM#11
Anitarf
You can initialize two variable arrays, one of summoned units, and one of spells that summon them. Then, when rain of chaos is cast, have a trigger that detects a unit being summoned, checks in the variable arrays which spell matches the unit, and cast that spell on.
02-15-2006, 11:35 PM#12
Erdrik
Quote:
Originally Posted by Anitarf
You can initialize two variable arrays, one of summoned units, and one of spells that summon them. Then, when rain of chaos is cast, have a trigger that detects a unit being summoned, checks in the variable arrays which spell matches the unit, and cast that spell on.

That would technicaly work, but again, not what im looking for.
The whole reason for this is to make a spellcasting system that would cast multiple instances of any spell without presetting them in a trigger before they are cast, but rather to dynamicly set the variable to the ability as the Trigger ability(Rain of Chaos) is being cast. this would allow for any future spell additions to be compatible without having to manualy add them to a huge array.

like:
Code:
Event
Unit - A unit Starts the effect of an ability
Condition
(Ability being cast) Equal to Rain of Chaos
Actions
Set - AbilityVariable[(Player Number of (Owner of (Casting Unit)))] = (Summon Ability of Ability being cast)
Unit - Create 1 DUMMYCASTER for ((Player(Player Number of (Owner of (Casting Unit))))
Set - DUMYUNITvariable[(Player Number of (Owner of (Casting Unit)))] = (Last Created Unit)
Unit - Add AbilityVariable[(Player Number of (Owner of (Casting Unit)))] to 
 DUMYUNITvariable[(Player Number of (Owner of (Casting Unit)))]
Set - OrderString[(Player Number of (Owner of (Casting Unit)))] = ??Don't know?? Get order string of 
 AbilityVariable[(Player Number of (Owner of (Casting Unit)))]
Unit - Order (DUMYUNITvariable[(Player Number of (Owner of (Casting Unit)))]) to ??Don't Know?? order string of 
 AbilityVariable[(Player Number of (Owner of (Casting Unit)))] ??Don't Know?? Target of 
 AbilityVariable[(Player Number of (Owner of (Casting Unit)))]

I hope that clears things up, tho my trig may be too messy
02-16-2006, 12:12 AM#13
Anitarf
So, you want to duplicate every summon that's summoned, or what? I don't quite understand what you hope to accomplish with this trigger.

You have other problems, for example, there's no function that would give you the orderstring for an ability.
02-16-2006, 12:21 AM#14
Erdrik
Quote:
Originally Posted by Anitarf
So, you want to duplicate every summon that's summoned, or what? I don't quite understand what you hope to accomplish with this trigger.
Actualy I want to set a non summon ability as the Rain of Chaos ability and basicaly use it as a 'holder' to allow a trigger to detect the spell set to variable then cast. Rain of Chaos already makes multiple casts of Summons spells but does nothing with non summons. So I was looking to see if I could use triggers to do it with non summons.

Quote:
Originally Posted by Anitarf
You have other problems, for example, there's no function that would give you the orderstring for an ability.
Not even in JASS? awwhh...
02-16-2006, 12:31 AM#15
Anitarf
Well, as has been said, it is possible to read some art fields of a spell with triggers... so, if any of those fields is a string, you could input all the data there (spell code, spell order, number of spells to be cast, AoE radius) and read those with the trigger, but I'm not sure if that's possible at all, and I don't think it's particularly practical.