HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Help with dummy skill trigger?

01-11-2004, 06:43 PM#1
GreyArchon
I made a passive Hero ability off of Phoenix Fire I call Armageddon. Of course, once researched, it doesn't show up in the hero's skill list (things like phoenix fire, tornado wander etc. never do).


So to fix this, I made a dummy skill based off of Bash... and then did this trigger:



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

function Trig_Armageddon_lvl_1_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A03A', gg_unit_O000_0034 )
call DisableTrigger( GetTriggeringTrigger() )
endfunction

//===========================================================================
function InitTrig_Armageddon_lvl_1 takes nothing returns nothing
set gg_trg_Armageddon_lvl_1 = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Armageddon_lvl_1, gg_unit_O000_0034, EVENT_UNIT_HERO_SKILL )
call TriggerAddCondition( gg_trg_Armageddon_lvl_1, Condition( function Trig_Armageddon_lvl_1_Conditions ) )
call TriggerAddAction( gg_trg_Armageddon_lvl_1, function Trig_Armageddon_lvl_1_Actions )
endfunction


Or look in the attachment for a more simple representation.


It doesn't seem to work. The dummy skill won't show up. What am I doing wrong?
01-11-2004, 06:46 PM#2
Hunter0000
ok, first the basics.. the dummy is a unit skill right?(otherwise it wouldnt work)
01-11-2004, 08:26 PM#3
GreyArchon
Quote:
Originally posted by Hunter0000
ok, first the basics.. the dummy is a unit skill right?(otherwise it wouldnt work)


Yes, it is. :)
01-12-2004, 08:05 AM#4
GreyArchon
Bump? :WD:
01-12-2004, 07:16 PM#5
GreyArchon
Bump number two? :(
01-12-2004, 09:27 PM#6
AllPainful
Ok, instead of specifying which unit learned the skill, why not do a generic. Something like this:
Code:
Event
  Unit learns a skill
Conditions
  Unit type of (learning unit) equal to Fire Elemental
  Learned skill equal to Armageddon
Actions
  Add Armageddon Dummy to unit (Learning unit)

Because if you Create/Remove or modify units, sometimes their identifiers change (in this case the identifier of "Fire Elemental 034 <gen>")
01-13-2004, 08:13 PM#7
GreyArchon
Quote:
Originally posted by AllPainful
Ok, instead of specifying which unit learned the skill, why not do a generic. Something like this:
Code:
Event
  Unit learns a skill
Conditions
  Unit type of (learning unit) equal to Fire Elemental
  Learned skill equal to Armageddon
Actions
  Add Armageddon Dummy to unit (Learning unit)

Because if you Create/Remove or modify units, sometimes their identifiers change (in this case the identifier of "Fire Elemental 034 <gen>")


Hmm, yeah, I'll try that. Thanks. :)