• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

[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
 
Level 5
Joined
Jun 13, 2015
Messages
129
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.
 
Level 11
Joined
Aug 24, 2012
Messages
429
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:)
 
Level 6
Joined
Mar 17, 2012
Messages
105
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.
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
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.
Top