HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Custom Ability Reference in Conditions

11-30-2003, 11:47 PM#1
Dragon
How can I refer to a custom ability in Conditions?

Example:

Events:
A unit learns a spell
Conditions:
Learned spell equal to <custom ability here>
12-01-2003, 01:21 AM#2
Xinlitik
Three ways.

1) I dont recommend this way: Learned hero skill level equal to (pick the one that you based your spell off of. ) ONLY USE IT IF YOU ONLY BASED ONE SPELL OFF THAT SPELL!

2) Learned hero skill level equal to Human blizzard. Convert to custom text, replace AHbz with the code of your spell. To get this code, go to ability section press ctrl+D and read what it says in front of your spell's name on the list of spells.

3) Convert a trigger that says ONLY condition- Learned hero skill equal to human blizz. Convert it to custom text. Copy the 3 lines that say :
if learned skill level (AHbz)(BJ) or something like that, then the one after it, and finally the endif.

Then, create an action of Custom Script and fill in the first line. Make another, second line. Make a third, third line. That should be before any of your other actions, and there should not be a GUI form of the learned skill level condition.
12-01-2003, 04:10 AM#3
Dragon
How do you convert to custom text?
12-01-2003, 04:29 AM#4
FF_Behemoth
@Personthing its in the edit tab, convert trigger to custom text. [edit] what are you doing asking trigger questions??? Aint you a terrain dude for Bifrost?? I'm just j/k:ggani:...............

Quote:
1) I dont recommend this way: Learned hero skill level equal to (pick the one that you based your spell off of. ) ONLY USE IT IF YOU ONLY BASED ONE SPELL OFF THAT SPELL!
Dont do this...

Quote:
2) Learned hero skill level equal to Human blizzard. Convert to custom text, replace AHbz with the code of your spell. To get this code, go to ability section press ctrl+D and read what it says in front of your spell's name on the list of spells
This method works but It converts your trigger into custom text and you cannot change it back.

Quote:
3) Convert a trigger that says ONLY condition- Learned hero skill equal to human blizz. Convert it to custom text. Copy the 3 lines that say :
if learned skill level (AHbz)(BJ) or something like that, then the one after it, and finally the endif.
This is the method I use, and I'll explain a bit further then Xinlitik

Events
Unit - A unit Learns a skill
Conditions
Actions
Custom script: if ( not ( GetLearnedSkillBJ() == 'A008' ) ) then
Custom script: return false
Custom script: endif
---insert whatever actions---
Set Omnislash_LvL = (Omnislash_LvL + 1) <--- this is the most commonly used action with this trigger to set spell lvls. Then in a seperate trigger that detects when the spell is casted, use if then else to determine (in this case) omnislash's lvl.

The A008 is the 4 letter code for a spell. (also remeber custom scrips are case sensitive)
12-01-2003, 05:22 AM#5
Hunter0000
actully, you can do the first method

just add in

triggering unit = to (the unit type of hero that has that spell)

This workers perfect, as you cannot have the same spell base twice on a hero.
12-01-2003, 05:48 AM#6
FF_Behemoth
Quote:
actully, you can do the first method. This workers perfect, as you cannot have the same spell base twice on a hero
yes that would work, but the keyword here is that you CANNOT base off that spell again.:nono: This can serveraly limit your options for creating other spells.