HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need help bad, confusing spell, variable problems

04-27-2004, 10:23 AM#1
PhaT
Preview
Ok, i'm just about ready to give up on this spell... what it basically does is..
The spell is passive and what it does is, when my hero attacks a unit, that unit will be cursed and has a chance to miss.. the spell has 8 levels and each level increases the chance the unit has to miss.

The way i did it, was when the unit learned the skill, it will create an invisible unit with no model, and will cast curse on all units it attacks. I used 2o seperate triggers to set it up. I had to use an array for the unit variable because there are 8 players in the game.

The first trigger basically sets it up

Unit - A unit Learns a skill

(Learned Hero Skill) Equal to Elf Fire
(Unit-type of (Triggering unit)) Equal to Elven Champion

Unit - Remove Unit_Elffire[(Player number of (Triggering player))] from the game
Unit - Create 1 Elf Fire Dummy for Player 1 (Red) at (Position of (Triggering unit)) facing Default building facing degrees
Unit - Add Spell_Elffire[(Level of Elf Fire for (Triggering unit))] to (Last created unit)
Set Unit_Elffire[(Player number of (Triggering player))] = (Last created unit)

and the second casts the spell

Unit - A unit Is attacked

(Unit-type of (Attacking unit)) Equal to Elven Champion

Unit - Order Unit_Elffire[(Player number of (Triggering player))] to Undead Banshee - Curse (Attacked unit)

Now the problem i'm having is that when i learn the level 1 skill, it creates the elf fire dummy with the level one elf fire, but when i learn it again, everything works fine and it removes the old elf fire dummy, but when it creates a new elf fire dummy, it does not have level 2 elf fire.

Another problem i was experiencing is, the elf fire dummies aren't casting elf fire (which is the curse) on the units that my hero was attacking... did i set the unit variable wrong? the only thing i can think of was to set it to last created unit.

Any help would greatly be appreciated, thanks in advance!!
04-27-2004, 07:19 PM#2
ThyFlame
Can you submit a map with this trigger in it. I believe I know what things to look at, but some of your variable names are confusing and that would be much easier.
04-27-2004, 08:14 PM#3
PhaT
Sorry, i'm not very familiar with wc3campaigns.com

Where and how can i submit my map into the site?
04-27-2004, 09:27 PM#4
ThyFlame
Below the submit reply or edit message buttons is a manage attachment button. Click that and go from there.
04-27-2004, 09:39 PM#5
PhaT
ok here it is
04-27-2004, 09:49 PM#6
PhaT
hm, seem to be having some problems, hope it works this time
04-27-2004, 10:00 PM#7
QuatreDan
Quote:
Originally Posted by PhaT
Unit - A unit Is attacked

(Unit-type of (Attacking unit)) Equal to Elven Champion

Unit - Order Unit_Elffire[(Player number of (Triggering player))] to Undead Banshee - Curse (Attacked unit)

Now, take notice that the ability you gave the Elf fire dummy is not the same ability that the banshee has; it is a custom ability. Order it to use your custom ability, not what your custom ability was based off of. You can't order it to use an ability it doesn't have. Try that. :D
04-27-2004, 10:25 PM#8
ThyFlame
Neh. Looks like you weren't using the right event responses. Fixed your initilization and made the dummy cast unseeable.
04-27-2004, 11:10 PM#9
Luther
Dan - I'm fairly sure that you cannot order a unit to specifically cast a custom spell, you have to order it to cast the spell that the custom spell is based off, unless I'm totally wrong, in the which case I would Really love to know how.
04-28-2004, 12:04 AM#10
QuatreDan
Well, I couldn't verify because I don't have Warcraft currently installed. If I am not mistaken, however, that last patch that updated the world editor brought with it that ability. You can now use ability conditions that let you pick from an actual list of ability names rather than just order strings, including custom abilities. I suppose I'll reinstall Warcraft if you'd like me to check. Take note, it may be Frozen Throne only...if you don't have it, that is. I assume you have it, so maybe you just didn't realize that they added that in. Would you mind double checking that for me? Thanks. :D
04-28-2004, 12:37 AM#11
ThyFlame
Quote:
Originally Posted by QuatreDan
Well, I couldn't verify because I don't have Warcraft currently installed. If I am not mistaken, however, that last patch that updated the world editor brought with it that ability. You can now use ability conditions that let you pick from an actual list of ability names rather than just order strings, including custom abilities. I suppose I'll reinstall Warcraft if you'd like me to check. Take note, it may be Frozen Throne only...if you don't have it, that is. I assume you have it, so maybe you just didn't realize that they added that in. Would you mind double checking that for me? Thanks. :D



The order unit to cast must use the base. The spell is cast may use the specific spell.
04-28-2004, 04:47 AM#12
PhaT
woo hoo, works like a charm, thanks a lot thyflame, really appreciate it :)