| 07-11-2004, 09:17 PM | #1 |
Any way to get the demon hunter to automatically morph when it turns into night? Things to keep in mind are that the hero is selected DOTA style from a tavern so he is not already in the map. |
| 07-11-2004, 09:31 PM | #2 |
It can be done through triggers. Create a Unit Variable called DemonHunter (Array if you plan to have more than one) Code:
[u]Trigger One - Setting the Demon Hunter Variable[/u] Events: (Unit - Generic Unit Event) A Unit Finishes training a unit Conditions: (Unit-type Comparsion) (Unit-type of (Trained unit)) Equal to Demon Hunter Action: (Set Variable) Set DemonHunter to (Trained unit) [u]Trigger Two: Transformation to Demon[/u] Events: (Game - Time of Day) The in-game time of day becomes Equal to 18.00 Conditions: Actions: (Unit - Issue Order With No Target) Order DemonHunter to Night Elf Demon Hunter - Metamorphosis Of course by my assumption that the Demon Hunter is at level six and you altered the metamorphosis duration. If you alter it to last the duration of the entire night, it will transform back at day. |
| 07-11-2004, 09:48 PM | #3 |
wow. Thanks for the great start on that. Here is another question though. I have a custom unit using a custom ability and the custom units and their abilities are not listed in the order unit drop down list. My custom unit is the Demon Hunter with the Druid of the Claw model file. The unit he transforms into is the Bear form of the Druid of the claw (based of the Demon Hunter metamorphosis). The metamorphosis ability has 4 levels to it and each level morphs him into a stronger bear. Which is why it is a custom ability. So how do you get custom units to cast custom abilies? |
| 07-11-2004, 09:59 PM | #4 |
From what I understand, you cannot. I suggest you edit the original ability itself and follow the triggers I gave you. This will work (just tested it). |
| 07-11-2004, 10:14 PM | #5 |
Yeah I got it to work also. I really appreciate your help. |
| 07-11-2004, 11:46 PM | #6 |
Custom spells use the same ordercode as their base spell. So if you want your custom hero to cast a spell based on stormbolt, just order it to "Human Mountain King- Stormbolt". |
| 07-12-2004, 02:45 AM | #7 | |
Quote:
Really? Then how does the game decide if the ability you want to cast is the original stormbolt or the custom spell based on stormbolt? |
| 07-12-2004, 02:49 AM | #8 |
I really like this idea, Im just curious is it for a werewolf? |
| 07-12-2004, 06:00 AM | #9 |
Ez8: It DOESN'T. That's why you should not give a unit two actively used spells based on the same ordercode. The ordercode is a field in the spell and usually looks something like "magicdefense" or "unmagicdefense". |
| 07-12-2004, 06:08 AM | #10 |
and for some strange reason, changing the ordercode in the editor dosnt do anything. What it does when u do the ordercode is it picks the spell on the hero that has that ordercode, if there are 2 of them then it picks the "first" one. If the "first" one isnt ready yet, it will pick the 2nd one. |
