• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[vJASS] transformations of courier (like Dota)

Status
Not open for further replies.
Level 6
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?
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:
Level 6
Joined
Apr 16, 2011
Messages
158
You know in Dota when you click on this button and then the model of your unit switches? That is what I did,only that do not know if there are better way to be done.

imagem.jpg
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,188
You know in Dota when you click on this button and then the model of your unit switches?
I was not aware people were required to play DotA in order to be known as a WarCraft III modder...

I suspect it uses the simple morph such as that used by the Demon Hunter and various Night Elf units such as the Druid of Claw or Talon but would need more information on the problem specification to explain in more detail.
 
Level 17
Joined
Jul 17, 2011
Messages
1,864
well you dont need to play dota to be known. everyone is copying spells from it because its the most popular wc3 map the spells are quite good too

as for this i have a few theories :D :

1. you add or remove the chaos ability this is most likely how it works. i dont know if thats what ur doing with the code because i cant tell what ability codes those are

2. maybe its a morph within a morph i dunno if that is possible as i have never tested and the morphing in dota is not random it is the same on each "cycle" and since morphed units have their own abilities then its possible >_> oh but morph is only a 1 way process e.g. in dota, when you click on the spell icon it does not turn the courier back to its previous model so it MUST be chaos which makes this work chaos lets you retain all abilities and items too
 
Status
Not open for further replies.
Top