HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Upgrading Custom Cannibalism via Triggs

09-01-2003, 02:04 AM#1
Progniss
Ok I have seen this posted befor but not CORRECTLY answerd.
I cannot seem to get this to work.... is it possible? I changed the trigger to custom text and change the spell code and it still does not work. Someone please help me?
09-01-2003, 02:20 AM#2
Allanon[Druid]
Well, what are you trying to customize about cannibalise? Like...umm the unit also gains mana or something?
09-01-2003, 03:02 AM#3
Progniss
yes, I want to make it so that at lvl 1 he gets 10 mana per second. Lvl 2 20 and lvl 3 30......
09-01-2003, 03:48 AM#4
Allanon[Druid]
Use the 'A Unit Starts Channeling' event (Generic Unit). Then do a loop and add 10 or whatever amount of mana you want every second.
09-01-2003, 03:52 AM#5
Progniss
Yes i know that, but that will not Increase the mana upgrade for everytime it lvl's i need to make it so when he clicks learn 'cannibalism' lvl 1 he gets 10 mana while channeling
and when he clicks leanr 'cannibalism' lvl 2 he gets 20 mana while channeling....ect get it? I need to make it so when he learns it; it works but i cant get the Hero - Learns Ability thing to work even when i make it custom text and edit it -.-
09-01-2003, 04:28 AM#6
noobelite
maybe you could use the event, learns a skill, skill=custom cannibalism, add +1 to an integer array of 12 (one for each player, starting at 0), and if the integer is 1 do level 1 effects, integer is 2 do level 2 effects, etc
09-01-2003, 12:33 PM#7
Progniss
This is the trigger i have and it doesnt work.

*Befor I Converted it to Custom Text.

E) Unit - Sumo Wrestler 0071 <gen> Learns a skill
C) (Learned Hero Skill) Equal to Human Archmage - Blizzard
A) Set FF_LvLer = (FF_LvLer + 1)


*After i converted it to change it to my custom spell.
function Trig_FF_MANA_Set_LvL_Copy_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'Acn2' ) ) then
return false
endif
return true
endfunction

function Trig_FF_MANA_Set_LvL_Copy_Actions takes nothing returns nothing
set udg_FF_LvLer = ( udg_FF_LvLer + 1 )
endfunction

//===========================================================================
function InitTrig_FF_MANA_Set_LvL_Copy takes nothing returns nothing
set gg_trg_FF_MANA_Set_LvL_Copy = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_FF_MANA_Set_LvL_Copy, gg_unit_E003_0071, EVENT_UNIT_HERO_SKILL )
call TriggerAddCondition( gg_trg_FF_MANA_Set_LvL_Copy, Condition( function Trig_FF_MANA_Set_LvL_Copy_Conditions ) )
call TriggerAddAction( gg_trg_FF_MANA_Set_LvL_Copy, function Trig_FF_MANA_Set_LvL_Copy_Actions )
endfunction


*Then this is the trigger that gives mana.

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


Any ideas on what i did wrong? I made sure i only learned the ability to lvl 1; just so u know.
09-01-2003, 02:48 PM#8
Progniss
ahhh come on someone has to know this..... Please i need help on this I cannot Finish My map unless this works.
09-01-2003, 03:28 PM#9
Sage the Mage
You're only adding mana when he start's channeling. It's probably occuring only once. What you want to do is turn on a periodic event that adds +10 mana like every second or so when he channels. Then just turn it off when he stops casting the ability.
09-01-2003, 03:54 PM#10
Progniss
Thanks Sage, I changed everything but it still doesnt seem to work. Heres what i have

*This sets the Variable for the Spell
function Trig_FF_Mana_Set_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'Acn2' ) ) then
return false
endif
return true
endfunction

function Trig_FF_Mana_Set_Actions takes nothing returns nothing
set udg_FF_LvLer = ( udg_FF_LvLer + 1 )
endfunction

//===========================================================================
function InitTrig_FF_Mana_Set takes nothing returns nothing
set gg_trg_FF_Mana_Set = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_FF_Mana_Set, gg_unit_E003_0071, EVENT_UNIT_HERO_SKILL )
call TriggerAddCondition( gg_trg_FF_Mana_Set, Condition( function Trig_FF_Mana_Set_Conditions ) )
call TriggerAddAction( gg_trg_FF_Mana_Set, function Trig_FF_Mana_Set_Actions )
endfunction


* This Turns on The Periodic Timer Triggers.

E) Unit - Sumo Wrestler 0071 <gen> Begins casting an ability
C) (Ability being cast) Equal to Feeding Frenzy
A) If (FF_LvLer Equal to 1) then do (Trigger - Turn on Feeding Frenzy Mana 1 <gen>) else do (Do nothing)
A) If (FF_LvLer Equal to 2) then do (Trigger - Turn on Feeding Frenzy Mana 2 <gen>) else do (Do nothing)
A) If (FF_LvLer Equal to 3) then do (Trigger - Turn on Feeding Frenzy Mana 3 <gen>) else do (Do nothing)


*These are The Periodic Triggers.

E) If (FF_LvLer Equal to 3) then do (Trigger - Turn on Feeding Frenzy Mana 3 <gen>) else do (Do nothing)
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)


All 3 lvl's are the same just they give different amounts of mana.
In my mind this should make it work.... but it doesnt.
09-01-2003, 04:40 PM#11
Sage the Mage
What's it not doing exactly? Is the caster event not firing off? Is that the right ability code in the learner trigger? Is the mana add trigger firing off?
09-01-2003, 05:21 PM#12
Progniss
The Spell Code when i change it to raw data says A00L:Acn2
so i thought it was Acn2 it could possibly be A00L.
The Mana Gain Trigger Isnt Fiering. I will try A00L then post what happens.
09-01-2003, 05:38 PM#13
Progniss
Hey I have a question.... after i convert it to Custom text a little box at the top appears thats says Run on Map Initialization. Do i need to chack that?
09-01-2003, 05:45 PM#14
Progniss
Thanks a lot Sage I mean it..... I figured it out the spell code was A00L and I dont need to check that Box. I really appriciate you taking your time to help me thanks.