• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Skill that summons another hero?

Status
Not open for further replies.
Level 30
Joined
Nov 29, 2012
Messages
6,637
Well, make a custom ability. Better if it requires a target point. Now make a trigger that when that ability is cast, create a unit (the hero you want) at the point where you targeted it. Here is the trigger if you want though I am not sure if it is efficient and is MUI:

  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to >>Ability here<<
    • Actions
      • Set CastedPosition = (Target point of ability being cast)
      • Set CastingUnit = (Casting unit)
      • Unit - Create 1 >>Hero here<< for (Owner of CastingUnit) at CastedPosition facing Default building facing degrees

If you want an added special effect and duration for them, just create a special effect at the CastedPosition and for the duration of the Hero just make a timer and when it ends, remove the unit summoned. Better also if you can add a variable storing the Hero unit itelf when you are gonna do this.

But actually, you can just base an ability in a ability that summons a unit and just change it to a hero unit but I think that will cause a crash...
 
Well, make a custom ability. Better if it requires a target point. Now make a trigger that when that ability is cast, create a unit (the hero you want) at the point where you targeted it. Here is the trigger if you want though I am not sure if it is efficient and is MUI:

  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to >>Ability here<<
    • Actions
      • Set CastedPosition = (Target point of ability being cast)
      • Set CastingUnit = (Casting unit)
      • Unit - Create 1 >>Hero here<< for (Owner of CastingUnit) at CastedPosition facing Default building facing degrees

If you want an added special effect and duration for them, just create a special effect at the CastedPosition and for the duration of the Hero just make a timer and when it ends, remove the unit summoned. Better also if you can add a variable storing the Hero unit itelf when you are gonna do this.

But actually, you can just base an ability in a ability that summons a unit and just change it to a hero unit but I think that will cause a crash...



What base ability will i use? without a target point. Just a skill that when you click it, a hero will be summoned without a timer or anything.
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
You can maybe try modifying a Channel Ability and make it target a point or what I can think based it on Flame Strike without the spell models and also the damages. Just the cooldown you want for the skill, name and descriptions.
 
Level 15
Joined
Oct 18, 2008
Messages
1,591
don't forget to clean up CastedPosition by adding this line to the end of the trigger:
  • Custom script: call RemoveLocation(udg_CastedPosition)
Also, there is no need to create a variable for the Caster unit, since units themselves don't leak, only unit groups, so here is what it should look like:

  • Summon Hero
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to >>Ability here<<
    • Actions
      • Set CastedPosition = (Target point of ability being cast)
      • Unit - Create 1 >>Hero here<< for (Owner of Casting unit) at CastedPosition facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_CastedPosition)
 
Level 10
Joined
Dec 15, 2012
Messages
650
There is many ways to prevent that happens, here's one of the examples :
We can use Unit Group to prevent the hero being multiple-summoned just by adding this condition and action.
  • Update
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • ((Triggering unit) is in UnitGroup_CastedSummonHero) Equal to False
    • Actions
      • Unit Group - Add (Triggering unit) to UnitGroup_CastedSummonHero
To prevent the unit casted the spell but nothing happens :
  • Prevent
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to SummoningHero
      • ((Triggering unit) is in UnitGroup_CastedSummonHero) Equal to True
    • Actions
      • Unit - Order (Triggering unit) to Stop
      • -------- Display the error message to owner of casting unit if you want --------
If you want to remove this spell from UnitX after UnitX casted it then add this action to the first trigger
  • Unit - Remove SummoningHero from (Triggering unit)
 
Level 13
Joined
Jan 30, 2012
Messages
1,298
something simplier and without trigger can do that too

go to the hero you want to be summoned
change the stats - Hero - Hide Hero death messages to true
stats - Hero - Hide Interface icon to true
stats - Hero - Hide Hero Minimap display to true
then create ability based on something like Feral Spirit or Water Elemental
change the Data - Summoned Unit to hero you want to be summoned
change the buff if you want to
last add the ability to Hero you want to cast the spell
done

if you want based on trigger follow the expert suggestion above :grin:
not me..

oh one thing if you want based on this it's going to replace the previously summoned Hero
 
Status
Not open for further replies.
Top