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

[Spell] Getting started with a "Charge" trigger/ability

Status
Not open for further replies.
Level 6
Joined
Mar 17, 2012
Messages
105
I'm trying to make an ability for my Knight so that he deals additional damage and stuns targets on initial attacks.

"Initial attacks" implies the two conditions (however, if you have your own ideas for an initial attack, that'd be fine):
- the attack wasn't preceded by another attack within the past (15) seconds
- the Knight was moving for (3) seconds prior to the attack

This would simulate the Knight doing a "shock charge" when a battle begins. However, I don't know how to go about starting this. If anyone can get me started on the right foot that'd be great! Also if someone knows of an ability or other way to simplify the "initial attack" aspect, that'd be great! Thanks!

EDIT: For clarification, the Knight is not a single unit, but a unit that can be trained and a player can own multiple
 
You could maybe have like a Wind Walk ability as a base but remove the invisibility. Not sure whether it will work or not as I did not really poke around Wind Walk that much but it should work.
 
The only ability that does something similar is indeed Wind Walk. However, there is no way to remove Wind Walk's invisibility part.

I tried doing the same thing you are doing with the Knight Charge for a long time. Let me know if you succeed:)
 
The only ability that does something similar is indeed Wind Walk. However, there is no way to remove Wind Walk's invisibility part.

I tried doing the same thing you are doing with the Knight Charge for a long time. Let me know if you succeed:)

I believe the game Custom Castle Defense had an ability for the Knight where this worked? I remember the Knight having an auto-cast ability that looked to be based on Black Arrow, then perhaps there was some triggering involved with conditions for when the ability would work. I know a bot regularly hosts the game so I'll download the map and take a look at the triggers and report back.
 
You could use a damage detection system and Is unit moving system, both can be found from the spell database.

For each knight, you would create two timers and store them into a hashtable. CreateTimer is the function to call.

Unit starts moving -> start the movement timer
Unit takes damage -> start the attack timer

Both are countdown timers.

Elapsed time for both timers needs to be 0 for the initial attack to be possible.
 
Status
Not open for further replies.
Back
Top