HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

trigger for fixing 'lose control hero'

04-16-2005, 10:25 AM#1
escpy
Quote:
What we did is wrote some code that when you typed -recreate it picked the hero owned by the player and:

1) Gave it a Channel variant that took X seconds to complete, and order it to cast it. Since Channel has an uninterruptable option, it's ideal
2) Then made a separate trigger waiting for unit to finish casting the above-mentioned skill.
3) Loop 1 to 6, give items in Triggering Unit's [Loop Integer A] Slots to Last Created Unit
4) Set Life, mana, and XP to the right values (well, ours only works at the fountain so we skipped life and mana since it's pointless)
5) Set the levels of the skills on the unit to what they were. The best way to do this is by Loop 1 to Level of Ability on Triggering Unit the Ability. This will make any triggers based on "Hero learns" properly function. If you want to avoid tihs, just do "set level of ability on last created unit to triggering unit".

This last step is tricky, however, because there is no easy way to detect what skills a unit has. so basically we added "If unit type of triggering unit = Lycanthrope, then..." and then had his 4 skills listed by name. However, if you can re-learn skills anyway in your map, you can skip this step.
6) Remove Triggering Unit

We made the channeling time so long to avoid using it to refresh cooldowns. Make sure that the order ID on the Channel-based skill isn't a skill you're using anywhere on a unit that might do this, or else it'll screw things up.


anyone can help me develop a trigger for this ?
04-16-2005, 01:45 PM#2
Guest
Excuse me, but I won't just give you a whole trigger served on a plate like this. First try to make your own, then I'll tell you what's wrong or what you didn't know what to do. This place is for trigger help not creating a whole trigger just for you...