- Joined
- Apr 16, 2011
- Messages
- 158
[Resolved] transformations of courier
You know with works the change in models of courier in DOTA?is similar that I want to do.
I have:
15 models.
15 ablities
-The first courier already starts with a skill,when he activates it disappears,then and activated the code and added to the next skill.
I did my "system" in this way,i found not very efficient but work. (with that my vjass Crazy) finally,suggestions please ?
And in some place i need to undo the TRIGGER_UNIT,it would be in soon after adding the ability right?
You know with works the change in models of courier in DOTA?is similar that I want to do.
I have:
15 models.
15 ablities
-The first courier already starts with a skill,when he activates it disappears,then and activated the code and added to the next skill.
I did my "system" in this way,i found not very efficient but work. (with that my vjass Crazy) finally,suggestions please ?
And in some place i need to undo the TRIGGER_UNIT,it would be in soon after adding the ability right?
JASS:
private static method run_4 takes nothing returns nothing
// exemple
call UnitAddAbility(.TRIGGER_UNIT, ABIL_CODE_5)
set .TRIGGER_UNIT = null
endmethod
JASS:
library PetSystem requires SpellEffectEvent
globals
private constant integer ABIL_CODE_1 = 'A001'
private constant integer ABIL_CODE_2 = 'A000'
private constant integer ABIL_CODE_3 = 'A002'
private constant integer ABIL_CODE_4 = 'A003'
private constant integer ABIL_CODE_5 = 'A004'
private constant integer ABIL_CODE_6 = 'A005'
private constant integer ABIL_CODE_7 = 'A006'
private constant integer ABIL_CODE_8 = 'A007'
private constant integer ABIL_CODE_9 = 'A008'
private constant integer ABIL_CODE_10 = 'A009'
private constant integer ABIL_CODE_11 = 'A00A'
private constant integer ABIL_CODE_12 = 'A00B'
private constant integer ABIL_CODE_13 = 'A00C'
private constant integer ABIL_CODE_14 = 'A00D'
private constant integer ABIL_CODE_15 = 'A00E'
endglobals
struct Units
private static unit TRIGGER_UNIT = GetTriggerUnit()
private static method run_1 takes nothing returns nothing
call UnitAddAbility(.TRIGGER_UNIT, ABIL_CODE_2)
endmethod
private static method run_2 takes nothing returns nothing
call UnitAddAbility(.TRIGGER_UNIT, ABIL_CODE_3)
endmethod
private static method run_3 takes nothing returns nothing
call UnitAddAbility(.TRIGGER_UNIT, ABIL_CODE_4)
endmethod
private static method run_4 takes nothing returns nothing
call UnitAddAbility(.TRIGGER_UNIT, ABIL_CODE_5)
endmethod
private static method run_5 takes nothing returns nothing
call UnitAddAbility(.TRIGGER_UNIT, ABIL_CODE_6)
endmethod
private static method run_6 takes nothing returns nothing
call UnitAddAbility(.TRIGGER_UNIT, ABIL_CODE_7)
endmethod
private static method run_7 takes nothing returns nothing
call UnitAddAbility(.TRIGGER_UNIT, ABIL_CODE_8)
endmethod
private static method run_8 takes nothing returns nothing
call UnitAddAbility(.TRIGGER_UNIT, ABIL_CODE_9)
endmethod
private static method run_9 takes nothing returns nothing
call UnitAddAbility(.TRIGGER_UNIT, ABIL_CODE_10)
endmethod
private static method run_10 takes nothing returns nothing
call UnitAddAbility(.TRIGGER_UNIT, ABIL_CODE_11)
endmethod
private static method run_11 takes nothing returns nothing
call UnitAddAbility(.TRIGGER_UNIT, ABIL_CODE_12)
endmethod
private static method run_12 takes nothing returns nothing
call UnitAddAbility(.TRIGGER_UNIT, ABIL_CODE_13)
endmethod
private static method run_13 takes nothing returns nothing
call UnitAddAbility(.TRIGGER_UNIT, ABIL_CODE_14)
endmethod
private static method run_14 takes nothing returns nothing
call UnitAddAbility(.TRIGGER_UNIT, ABIL_CODE_15)
endmethod
private static method run_15 takes nothing returns nothing
call UnitAddAbility(.TRIGGER_UNIT, ABIL_CODE_1)
endmethod
private static method onInit takes nothing returns nothing
call RegisterSpellEffectEvent(ABIL_CODE_1, function thistype.run_1)
call RegisterSpellEffectEvent(ABIL_CODE_2, function thistype.run_2)
call RegisterSpellEffectEvent(ABIL_CODE_3, function thistype.run_3)
call RegisterSpellEffectEvent(ABIL_CODE_4, function thistype.run_4)
call RegisterSpellEffectEvent(ABIL_CODE_5, function thistype.run_5)
call RegisterSpellEffectEvent(ABIL_CODE_6, function thistype.run_6)
call RegisterSpellEffectEvent(ABIL_CODE_7, function thistype.run_7)
call RegisterSpellEffectEvent(ABIL_CODE_8, function thistype.run_8)
call RegisterSpellEffectEvent(ABIL_CODE_9, function thistype.run_9)
call RegisterSpellEffectEvent(ABIL_CODE_10, function thistype.run_10)
call RegisterSpellEffectEvent(ABIL_CODE_11, function thistype.run_11)
call RegisterSpellEffectEvent(ABIL_CODE_12, function thistype.run_12)
call RegisterSpellEffectEvent(ABIL_CODE_13, function thistype.run_13)
call RegisterSpellEffectEvent(ABIL_CODE_14, function thistype.run_14)
call RegisterSpellEffectEvent(ABIL_CODE_15, function thistype.run_15)
endmethod
endstruct
endlibrary
Last edited: