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

Scripting my Heroes abilities

Status
Not open for further replies.
Level 1
Joined
Nov 27, 2013
Messages
2
I am trying to create a hero with 5 abilities and I would like to know how to script them as I myself have no idea.

The first ability is a passive ability called Moon Scars. Every 4 attacks he inflicts a mark on the enemy. This mark can be consumed by an auto attack or ability to have an additional affect. If he consumes it with an auto attack he does bonus damage and is healed.

The second ability an AoE knockup ability. I have no idea how I would script this. I he consumes the Moon Scar with this ability, he gains Mana.

The third ability an attack speed and move speed bonus.

The fourth is a dash. If he consumes the scar with the dash he gets a second dash or no extra cost and the cooldowns on all his other abilities go down.

The fifth ability is a skill shot. It's a long line and it deals damage whilst knocking back all the enemies it touches and applying moon scar.

If anyone could help me with this It would be much appreciated. I have only just begun scripting abilities and stuff like that. Before this my only use for the editor was to make maps.
 
Level 25
Joined
Sep 26, 2009
Messages
2,405
Dunno how useful this post will be, but you may find something of use in it:

Attack and movement speed bonus ability => This ability is already in WC3 - like Berserk ability, but you just modify the "damage taken" value to 0, so your hero doesn't take increased damage.

For the first ability you would need damage detection system (DDS) - it's best you download one here on hive. Then it's just checking when a unit is damaged if the damage source is your hero and if it is auto attack, increment integer variable (which checks how many attacks that hero made) and check if the number in the integer is equal to 4, if yes, apply special effect on target.
Also check if target has the debuff for the healing part of the ability.

AoE knockup - you would have to try to mimic physics by increasing unit's flying height periodically (like every 0,03 second, so people get the assumption that it's a fluid movement) by a certain amount.


Dash - depends how you want things done and how it should behave. You either periodically move the unit or just increase its speed. The bonus dash could be made by using 2 same abilities - one has cost (this one is used by the hero) and one does not (this one is hidden). When the first one is used and the bonus dash should happen, then you just swap those 2 abilities. However afaik there is no such thing are reducing current cooldown on ability - you can only reset cooldown, so I don't think you can lower down cooldowns on other abilities.

Skill shot - you make dummy who does nothing but looks like the arrow, through periodic trigger you mimic movement by moving him little bit per trigger run and once in a while checking if there are any enemies in front of it to knock them away.
For the knockback I would suggest using a knockback system on hive.
 
Status
Not open for further replies.
Top