• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Spell] Shadow Clone Attack

Status
Not open for further replies.
Level 12
Joined
Nov 3, 2013
Messages
989
When the hero attacks with a custom searing arrow a "shadow clone" (basically a copy of the hero) spawns and attacks the same target once as well and is then removed.

It's working but the clone is also meant to be black and transparent which isn't working with wand of illusion because of hard coded wc3 stuff.

I could do it by creating hero clones each time but AFAIK heroes leak so that's no good.

I also thought of having look alike units but the ability is meant for a custom hero map so I'd have to make a unit copy of every hero which isn't that great either.

Is there some way I could either change color and transparity even though it's an illusion or use hero without making it leak?

  • Abil Shadow Clone Attack 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shadow Clone Attack (Neutral Hostile)
    • Actions
      • Custom script: local unit u = GetTriggerUnit()
      • Game - Display to (All players) the text: asdfdgd
      • Set Abil_ShClAt_unit_target = (Target unit of ability being cast)
      • Custom script: set udg_Abil_ShClAt_unit_source = CreateUnit( GetTriggerPlayer(), 'h002', GetUnitX(u), GetUnitY(u), GetUnitFacing(u) )
      • Custom script: call UnitAddAbility( udg_Abil_ShClAt_unit_source, 'A00A' )
      • Custom script: call UnitApplyTimedLifeBJ( 2.00, 'BTLF', udg_Abil_ShClAt_unit_source )
      • Trigger - Turn on Abil Shadow Clone Attack 2 <gen>
      • Custom script: call IssueTargetOrderById( udg_Abil_ShClAt_unit_source, 852274, u )
  • Abil Shadow Clone Attack 2
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
      • (Summoning unit) Equal to Abil_ShClAt_unit_source
    • Actions
      • Custom script: local unit u = GetSummonedUnit()
      • Custom script: call IssueTargetOrderBJ( GetSummonedUnit(), "attackonce", udg_Abil_ShClAt_unit_target )
      • Custom script: call UnitAddAbility( u, 'Aloc' )
      • Custom script: call SetUnitVertexColorBJ( u, 0.10, 0.10, 0.10, 0.40 )
      • Trigger - Turn off (This trigger)
p.s. no need to mention that it's not going to work with auto cast as it is :p
 
Level 6
Joined
May 20, 2014
Messages
228
Try using this:

  • Animation - Change Unit's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
> AFAIK heroes leak so that's no good.

No, they don't. This tutorial explains leaks in detail. They are usually caused by triggers, so using a hero won't really cause leaks, but rather when they are triggered to spawn in the map and not cleaning up their location/unit leaks.
 
Level 12
Joined
Nov 3, 2013
Messages
989
Ok, well I can do with that, still there's the problem with having multiple hero icons showing before the clones are removed from the game.
 
Level 6
Joined
May 20, 2014
Messages
228
So use wand of illusion solution as you posted, seems like the best solution. You should be able to use the function I posted earlier to change your illusion color, but if that doesn't work, then no idea. Another solution would be to duplicate the hero under another player (ideally neutral passive?) and order it to attack your enemy, so the hero icon doesn't show up and etc.
 
Level 22
Joined
Aug 27, 2013
Messages
3,973
attachment.php

just set them to true in object editor.
 

Attachments

  • help.JPG
    help.JPG
    63.4 KB · Views: 291
Status
Not open for further replies.
Top