| 08-10-2004, 04:58 PM | #1 |
I've been trying to make this spell, right. Basically it's supposed to work like chain lightning, that has a 50/60/70/80/90% probability of polymorphing the targeted units into creeps. IF the unit is polymorphed then the ray keep jumping, but if the unit doesn't get polymorphed, then the ray stops. I figured, the way to do this (and get the chain lightning effect) is to make a basic dummy spell, right. Wich is based of chain lightning, and has only 1 target. When a unit is hit by that ability two different dummy units are spawned. Nr. 1 is given a ability based of Orb of Lightning (New), that has has either a 50%, 60%, 70%, 80%, or 90% chance to activate when it hits it's target, wich cast the "Polymorphing Ray Checker"-ability. I then tell that unit to attack-move to a random point in in the playable map, but give it 0 movement speed (thus making it attack the closest unit, but not run-off). I also give it a 1 second generic expiration timer. The 2nd unit is given the actual polymorphing ability, wich it then promptly casts upon the targeted unit, before it wanishes into thin air, never to be seen again. The basics. I got two triggers for this (there will only be one of the casting unit on the map at any given time). One of them checks for the casting unit and the ability being cast. It goes as follows. Code:
Polymorphing Ray Caster
Events
Unit - A unit Starts the effect of an ability
Conditions
And - All (Conditions) are true
Conditions
(Unit-type of (Casting unit)) Equal to Chaos Mage
(Ability being cast) Equal to Polymorphing Ray - Checker (Norwegian)
Actions
Set Unit_PolymorphingRay_Caster = (Casting unit)
Unit - Create 1 The Attacking Dummy Unit for (Owner of (Casting unit)) at (Position of (Target unit of ability being cast)) facing Default building facing degrees
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Add Ability_Array_PolymorphingRay[(Level of Polymorphing Ray (Norwegian) for Unit_PolymorphingRay_Caster)] to (Last created unit)
Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
Unit - Create 1 The Dummy Unit for (Owner of (Casting unit)) at (Position of (Target unit of ability being cast)) facing Default building facing degrees
Unit - Hide (Last created unit)
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Add Polymorphing Ray to (Last created unit)
Unit - Order (Last created unit) to Orc Shadow Hunter - Hex (Target unit of ability being cast)The second ability does the exact same thing, with the small exception that it checks for the dummy unit, rather than the caster. Code:
Polymorphing Ray
Events
Unit - A unit Starts the effect of an ability
Conditions
Or - Any (Conditions) are true
Conditions
And - All (Conditions) are true
Conditions
(Unit-type of (Casting unit)) Equal to The Attacking Dummy Unit
(Ability being cast) Equal to Ray of Polymorphing - Unit Ability - Level 1 (Norwegian)
And - All (Conditions) are true
Conditions
(Unit-type of (Casting unit)) Equal to The Attacking Dummy Unit
(Ability being cast) Equal to Ray of Polymorphing - Unit Ability - Level 2 (Norwegian)
And - All (Conditions) are true
Conditions
(Unit-type of (Casting unit)) Equal to The Attacking Dummy Unit
(Ability being cast) Equal to Ray of Polymorphing - Unit Ability - Level 3 (Norwegian)
And - All (Conditions) are true
Conditions
(Unit-type of (Casting unit)) Equal to The Attacking Dummy Unit
(Ability being cast) Equal to Ray of Polymorphing - Unit Ability - Level 4 (Norwegian)
And - All (Conditions) are true
Conditions
(Unit-type of (Casting unit)) Equal to The Attacking Dummy Unit
(Ability being cast) Equal to Ray of Polymorphing - Unit Ability - Level 5 (Norwegian)
Actions
Unit - Create 1 The Attacking Dummy Unit for (Owner of (Casting unit)) at (Position of (Target unit of ability being cast)) facing Default building facing degrees
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Add Ability_Array_PolymorphingRay[(Level of Polymorphing Ray (Norwegian) for Unit_PolymorphingRay_Caster)] to (Last created unit)
Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
Unit - Create 1 The Dummy Unit for (Owner of (Casting unit)) at (Position of (Target unit of ability being cast)) facing Default building facing degrees
Unit - Hide (Last created unit)
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Add Polymorphing Ray to (Last created unit)
Unit - Order (Last created unit) to Orc Shadow Hunter - Hex (Target unit of ability being cast)The first unit targeted is polymorphed as it should be, and the ray jumps to the next one, but then nothing more happens... I'm horribly bad at making trigger spells that go over more than... well... 1 trigger, really. Don't ask me why, I'm like this with everything where I haven't got it all in front of my face. Call it a disability. Anyways; Could somebody, pleeease, tell me what I've doen wrong, here? I've been staring at the triggers for, like, 15 minutes, now, and ain't getting nowhere. The only conclution I came to was that the triggers, either, don't work if the ability is cast through a "Orb of Lightning"-ability, or that I've managed to confuse myself to such a degree that I've done everything up-side-down. I don't know wich one is more likely. |
| 08-10-2004, 07:22 PM | #2 |
Might i ask what exectly is wrong you just stated that you are making didnt say if it didnt work. also if it did work how much of it did |
| 08-10-2004, 08:43 PM | #3 | |
Quote:
EDIT: Oh, yes. And it would be nice if, hoping that soembody figured out how to do it, they could do it in GUI. BDSM has already provided me with a way to do it in JASS, but, honestly, I didn't understand much of it. I suspect that the reason for it not working is that the condition doesn't work when the 'effect' is 'started' through the 'Orb of Lightning (New)' ability... but I'm hoping that I'm wrong, here, and that I've just messed-up, 'cuz if it is, then I don't know how I should go about making the ability. |
| 08-10-2004, 10:40 PM | #4 |
sorry for my stupidity.. i apparently overlooked that .. i kept reading it like 20 times was like where is that part.. |
