HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Ability Learned....?

08-28-2003, 04:08 AM#1
Progniss
Ok Is there away around the Hero Skill Comparison for custom abilities?
08-28-2003, 04:10 AM#2
MarSara
Just conver the trigger to custom text then change the 'Axxx' to your custom ability code.
08-28-2003, 01:55 PM#3
Progniss
but then wont The rest of the trigger be in custom text? If so can I fill out what happens then do that? It would help If i could because I dont know jass.
08-28-2003, 02:12 PM#4
Progniss
Oh, also i forgot does the Hero Ability Learned ummm.... count it as a whole or as Lvl 1, 2,3? If it doesnt is there a way to make it so when LvL 1 of that spell is learned it turns on tirgger 1..... lvl 2 turns on trigger 2.....ect
08-28-2003, 02:46 PM#5
Ultramagnetic
Okay first thing's first... For the spell lvl thing you're going to need a variable. Make it an array if you plan on having more than one spell you need to track levels for. For now let's call this variable SpellLVL... SpellLVL needs to be an integer array. Don't set an inital value we want it to be 0... Because we want to be able to add +1 to it every level so it recognizes the right level of the spell

Now when you do your 'unit learns a skill event' in the actions part you're going to want to do

a: Set Variable = blah

YOUR version will look like this though

a: set SpellLVL[1] = SpellLVL[1] + 1

If you don't know how to do that it's simple... When it asks you what you want the 'value' of the variable to be. Go to the dropdown box above it and look for 'arithematic'. You should get a little 1 + 1. Click on the first '1' and up top there should be a list of variables in another dropdown box. Pick SpellLVL again, and hit okay... then hit okay again, and viola... You just made a trigger that tracks spell levels.

You WILL need to convert this trigger to JASS afterwards though if you want to track the level of a custom spell. For you condition part of the trigger just use any hero skill comparisson, then convert it to custom text, and replace that Axxx code with your own custom spell's Axxx code.

I know it sounds confusing, but once you get the hang of it it'll be one of the most usefull little tools you'll come across in your spell-editing career...

Enjoy.

-Ultra
08-31-2003, 02:00 PM#6
Progniss
Thanks for your adivce, I tried it and it didnt work so I know I did something wrong Here My Triggers.

This one makes The spell Lvl up.

function Trig_FF_Mana_Set_LvLs_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'Acn2' ) ) then
return false
endif
return true
endfunction

function Trig_FF_Mana_Set_LvLs_Actions takes nothing returns nothing
set udg_FF_LvLer[1] = ( udg_FF_LvLer[1] + 1 )
endfunction

//===========================================================================
function InitTrig_FF_Mana_Set_LvLs takes nothing returns nothing
set gg_trg_FF_Mana_Set_LvLs = CreateTrigger( )
call TriggerRegisterShowSkillEventBJ( gg_trg_FF_Mana_Set_LvLs )
call TriggerAddCondition( gg_trg_FF_Mana_Set_LvLs, Condition( function Trig_FF_Mana_Set_LvLs_Conditions ) )
call TriggerAddAction( gg_trg_FF_Mana_Set_LvLs, function Trig_FF_Mana_Set_LvLs_Actions )
endfunction


This is For LvL of the Spell


E) Unit - Sumo Wrestler 0071 <gen> Begins channeling an ability
C) (Ability being cast) Equal to Feeding Frenzy
C) FF_LvLer[1] Equal to 1
A) Special Effect - Create a special effect attached to the origin of Sumo Wrestler 0071 <gen> using Abilities\Spells\Undead\DarkRitual\DarkRitualCaster.mdl
A) Unit - Set mana of Sumo Wrestler 0071 <gen> to ((Mana of Sumo Wrestler 0071 <gen>) + 10.00)


The other 2 Lvls are the same Just the mana is up'd faster.
I would appriciate anyhelp you could give me; thanks.