• 🏆 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!

[Spell] Need help with Robo-goblin

Status
Not open for further replies.
Level 2
Joined
May 19, 2009
Messages
16
need help on the Robo-goblin spell, (TINKER ultimate)

how do I replace the spells of the normal form of the hero to a newer
set of spells?W

hen the Robo-goblin spell is activated, the spells of the alternate form doesn't appear, only the spells of the Normal form of the hero.
:vw_wtf:
How to fix this ? Sorry for bad english
 
Level 16
Joined
Dec 15, 2011
Messages
1,423
The spell's mechanics preserve the abilities of the normal form after the morph. New abilities can be added but default ones can't be replaced.

To solve your issue, I suggest this method: Assuming the spell is toggleable, you can catch the order event and switch skillset with an integer array acting as ability level storage. The downside is this can be abushed to cancel CD of other spells since removed and readded abilities automatically reset CD.
 
Level 16
Joined
Dec 15, 2011
Messages
1,423
Sorry I am on a phone so I can't post trigger of any sort. I guess some pseudo code would do. You will need an ability array and an integer array.

Event Map Init
Cond
Action
set AbiArr[0] = <normal form first abi>
-Do it for the other 2 abis-
set AbiArr[3] = <robo form first abi>
-Also do it for the other 2-

Event Order with no target
Cond order equal to robogoblin
Action
For each IntVar from 0 to 2
Set IntArr[IntVar] = get trigger unit's level of AbiArray[IntVar]
Remove AbiArr[IntVar]
Add AbiArr[IntVar + 3]
Set AbiArr[IntVar + 3]'s lvl to IntArr[IntVar]

Do the other one likewise with unrobogoblin order. Note that this is non-MUI. Remember to do the index carefully so you won't mess it up.
 
Status
Not open for further replies.
Top