HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Learning Hero skills - For trigger spells

11-03-2003, 10:19 PM#1
Zachary_Shadow
IC Learned
Events
Unit - A unit Learns a skill
Conditions
(Learned Hero Skill) Equal to Night Elf Warden - Fan Of Knives
Actions
Set Virtue_Inspire = (Virtue_Inspire + 1)
Game - Display to (Triggering player), at offset (0.00, 0.00) the text: IC set to +1

This is what I usually use...but this means some things that are pretty anoying:

I will need to base the dummy spell, off Fan of Knives (I would have either way, but it needs to be EXACTLY where Fan of Knives are)

I can only use it ONCE to create a dummy spell with the way that it works EG. Fan of Knives is a no target spell, that can be used for almost everything.

How can I work around this, and still get to set the "level" of the spell, using that spell as reference (rather have it a custom one, so I could have like 5 based off that, or more)

Anyone have any ideas on this ?
11-03-2003, 10:30 PM#2
Vexorian
Events:
A unit learns a skill
Conditions
Actions:
Custom Script: if ( not ( GetLearnedSkillBJ() == 'AHbz' ) ) then
Custom Script: return false
Custom Script: endif
....
(Now do your triggering stuff)


Replace the 'AHbz' with the ability code of the ability
11-03-2003, 10:46 PM#3
Zachary_Shadow
Quote:
Originally posted by Lord Vexorian
Events:
A unit learns a skill
Conditions
Actions:
Custom Script: if ( not ( GetLearnedSkillBJ() == 'AHbz' ) ) then
Custom Script: return false
Custom Script: endif
....
(Now do your triggering stuff)


Replace the 'AHbz' with the ability code of the ability


hmm, never played around with this custom script stuff :) Do they work like conditions ? won't it just skip over thoes and go to the bottom ? :)

EDIT: Getting an error:

Line 5522: Expected Expression
11-03-2003, 10:50 PM#4
Vexorian
Custom scripts can only be actions, but I was simulating a jass if then else statement.

Just use the custom script action and copy the stuf (case sensitive)
11-03-2003, 10:57 PM#5
Zachary_Shadow
Actions
Custom script: if ( not [ GetLearnedSkillBJ() == 'A001:AEfk' ) ) then
Custom script: return false
Custom script: endif
Set Virtue_Inspire = (Virtue_Inspire + 1)
Game - Display to (Triggering player), at offset (0.00, 0.00) the text: IC set to +1


This is what I have...what is wrong ?
11-03-2003, 11:03 PM#6
Vexorian
use 'A001' instead of the whole 'A001:AEfk' , you also have [ instead of a ( , I guess it is a typo
11-03-2003, 11:06 PM#7
Zachary_Shadow
Quote:
Originally posted by Lord Vexorian
use 'A001' instead of the whole 'A001:AEfk' , you also have [ instead of a ( , I guess it is a typo


w00ps :P Small typos hehe

Great, it works. I can just do this trick for every single kind like this! :) Awesome
11-03-2003, 11:17 PM#8
Zachary_Shadow
Wow, just tested it :) The lag has even gone away...wierd :P hehe

Thanks alot Vex, this owns, makes it ALOT easier to do custom spells :)

I still had like 5 errors in my triggers for this spell, which I forgot each time I tested :P lol But it's fixed now ! :)