HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need help with a Custom Ability

04-13-2006, 05:30 PM#1
Fulla
Soul Nova

Buffs a unit for a short duration
If buffed unit dies, whilst buffed all items it carries are destroyed.

Trigger1
Trigger:
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Soul Nova [Unholy Frenzy]
Collapse Actions
Unit Group - Add (Target unit of ability being cast) to Ability_White_SoulNovaGroup

Trigger2
Trigger:
Unit - A unit Dies
Collapse And - All (Conditions) are true
Collapse Conditions
((Dying unit) is in Ability_White_SoulNovaGroup) Equal to True
((Dying unit) is A Hero) Equal to True
Collapse Actions
Item - Remove (Item carried by (Dying unit) in slot 1)
Item - Remove (Item carried by (Dying unit) in slot 2)
Item - Remove (Item carried by (Dying unit) in slot 3)
Item - Remove (Item carried by (Dying unit) in slot 4)
Item - Remove (Item carried by (Dying unit) in slot 5)
Item - Remove (Item carried by (Dying unit) in slot 6)

Trigger3
Trigger:
Collapse Events
Time - Every 1.00 seconds of game time
Collapse Actions
Collapse Unit Group - Pick every unit in Ability_White_SoulNovaGroup and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Matching unit) has buff Soul Nova ) Equal to False
Collapse Then - Actions
Unit Group - Remove (Picked unit) from Ability_White_SoulNovaGroup
Collapse Else - Actions
Do nothing

Im pretty sure I need to do it a differnet way to trigger 2, just not sure how.

thank you
04-13-2006, 07:40 PM#2
RaeVanMorlock
Rather than having that unit group, why not use the condition that the unit has the buff? .. just as you worded it in the description.


Regardless, it looks like it should work unless WC3 can't remove items from dead units... in which case you may need to instant revive it, remove them, disable the trigger, re-kill the unit, and re-enable the trigger.
04-13-2006, 08:55 PM#3
Fulla
Well I revised it and it works, but it can have a few potential probs.

Trigger1
Trigger:
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Soul Nova [Unholy Frenzy]
Collapse Actions
Collapse For each (Integer A) from 1 to 6, do (Actions)
Collapse Loop - Actions
Item - Make (Item carried by (Target unit of ability being cast) in slot (Integer A)) Drop from Heroes upon death
Unit Group - Add (Target unit of ability being cast) to Ability_White_SoulNovaGroup

Trigger2
Trigger:
Unit - A unit Loses an item
Collapse Actions
Wait 0.10 seconds
Collapse Item - Pick every item in (Playable map area) and do (Actions)
Collapse Loop - Actions
Item - Remove (Picked item)

Trigger3
Trigger:
Time - Every 1.00 seconds of game time
Collapse Actions
Collapse Unit Group - Pick every unit in Ability_White_SoulNovaGroup and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Matching unit) has buff Soul Nova ) Equal to False
Collapse Then - Actions
Unit Group - Remove (Picked unit) from Ability_White_SoulNovaGroup
Collapse For each (Integer A) from 1 to 10, do (Actions)
Collapse Loop - Actions
Item - Make (Item carried by (Target unit of ability being cast) in slot (Integer A)) Stay with Heroes upon death
Collapse Else - Actions
Do nothing

If any player drops an item he will loose his item.

Any suggestions would be great