• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Need help creating a trigger for a custom spell

Status
Not open for further replies.
Level 2
Joined
Jun 5, 2018
Messages
7
Hey, I'm just a beginner in world editor so i actually want to know what triggers do i make when i want to make a skill like a cliche samurai finishing move. Thanks in advance
 
like he suddenly dashes to a targeted location and damages anyone who is in its path kind of like Magnus's skewer ability minus the hero drag and has a more increased speed to reach the destination.
 
Since you mentioned you are a beginner, I'll ignore the standards used by the community to get straight to the point.

First, you need create an ability. For this example I'll use Shockwave (Neutral Hostile).

Make sure all the values causing the ability to have a special effect and damage to be removed.


upload_2018-6-8_6-1-18.png



Once you are finish with the Object Editor, open the Trigger Editor.

You need the following variables:

upload_2018-6-8_5-52-5.png



The triggers used:

  • Dash Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Dash
    • Actions
      • Set Caster = (Triggering unit)
      • Set N = 0.00
      • Set Speed = 30.00
      • Set Distance = (Distance between (Position of (Triggering unit)) and (Target point of ability being cast))
      • Set Angle = (Angle from (Position of (Triggering unit)) to (Target point of ability being cast))
      • Unit - Turn collision for Caster Off
      • Trigger - Turn on Dash <gen>
The trigger Dash Cast is executed when you cast the Dash ability. It basically initializes the variables used, disables the collision, and turns on the Dash trigger.

  • Dash
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • N Less than Distance
        • Then - Actions
          • Set N = (N + Speed)
          • Unit - Move Caster instantly to ((Position of Caster) offset by Speed towards Angle degrees)
          • Unit Group - Pick every unit in (Units within 128.00 of (Position of Caster)) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) belongs to an enemy of (Owner of Caster)) Equal to True
                  • ((Picked unit) is alive) Equal to True
                  • ((Picked unit) is in DamageGroup) Equal to False
                • Then - Actions
                  • Unit Group - Add (Picked unit) to DamageGroup
                  • Unit - Cause Caster to damage (Picked unit), dealing 75.00 damage of attack type Spells and damage type Normal
                • Else - Actions
          • Destructible - Pick every destructible within 128.00 of (Position of Caster) and do (Actions)
            • Loop - Actions
              • Destructible - Kill (Picked destructible)
        • Else - Actions
          • Unit Group - Remove all units from DamageGroup
          • Unit - Turn collision for Caster On
          • Trigger - Turn off (This trigger)
Dash trigger should be disabled. It is enabled by the Dash Cast trigger. Once it is enabled, it will move the caster every 0.03 seconds to move forward. While moving, it checks for nearby enemy units to damage or destructible to destroy. Once it reached the destination, it will enable the caster's collision and turns off the trigger.

I added a sample spell in the attachment.

The standards I mention above are about memory leaks and Multi-unit Instanceability (MUI).
 

Attachments

Since you mentioned you are a beginner, I'll ignore the standards used by the community to get straight to the point.

First, you need create an ability. For this example I'll use Shockwave (Neutral Hostile).

Make sure all the values causing the ability to have a special effect and damage to be removed.


I would use Channel instead of Shockwave. Channel is made for triggered abilities like this, and Shockwave also leaks a terrain deformation. Aside from that, everything looks neat.
 
Status
Not open for further replies.
Back
Top