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

Replace Unit trouble

Status
Not open for further replies.
Level 1
Joined
May 4, 2009
Messages
1
Heya,

I'm having some problems with "Replace Unit"

Trigger goes as follows:

Event:
A unit begins casting an ability

Condition:
Ability being cast equal to 'MyCustomAbility'

Action:
Replace Triggering Unit with 'MyCustomUnit' using the new unit's max life and mana


Now, there are 20 MyCustomUnit's with corresponding MyCustomAbility's. Each unit is able to change to any other unit at any time (given requirements are met), so I have 20 of the aforementioned triggers set up, but the unit, no matter which ability used, always gets replaced with the 'MyCustomUnit' from the last trigger on the list.

My custom abilities are using Roar, should I use channel? Seems to be pretty popular in the tutorials.

Let me know if i need to clear that up a bit.

Thanks.
 
Level 13
Joined
Sep 14, 2008
Messages
1,407
I don't really understand your problem?

You just need 1 trigger:

event: Unit starts effect of ability
Actions:

If(ability being cast = customspell1)
replace with customunit1
elseif(ability being cast = customspell2)
replace with customunit2

...

and so on
 
Level 6
Joined
Jul 25, 2005
Messages
221
Could you post your triggers in [ trigger ] [ /trigger ] code, and put a [ hidden ] [ /hidden ] tag around it? Would be easier to identify your problem.

(All tags are without spaces and can be found in advanced reply)
 
Status
Not open for further replies.
Top