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

Attack Once

Level 13
Joined
Oct 28, 2019
Messages
523
Im trying making a RPG diablo style with a footman that if press Q it attack once.

What I´ve planned:

1)The Hero dont have any attack
2)Mark> you mark the target with X and a arrow appears up his head
3)Forked Lighting> If you press Q the hero cast forked lighting in enemy, but the effect is a sword attack and the damage is "strenght points"
A similiar system is used to "block" ability

4) need ideas that how this can be better or improved ;)

Other thing how can I appear the life/mana bars of units over his heads when they are near the hero
 
Level 25
Joined
Mar 29, 2020
Messages
1,466
I don't know exactly how it works in diablo, but in many games that don't have auto attacking and you have to manually press a button for each attack - it usually isn't target specific. For something like that an AOE triggered attack makes more sense.

so after you press q or whatever it triggers an attack animation, and under the hood "casts a spell" that deals damage to units in a cone in front of the attacking unit.

I would try something like that (unless I greatly misunderstood your vision).
 
I did something along those lines in: Mecha Protectors
What I did was having a fully triggered input handling and mouse tracking (with camera locked on hero).
So when clicking Q, I called some jass that ran some code, firing a Relativistic Missiles [vJASS][LUA][GUI] projectile, with some animations running etc. I tracked cooldowns and the hero-state myself (deselecting the unit while in-animation, but I had custom UI so it wasn't noticeable).
You can see the CustomSystems/HeroController-trigger for code for the system and Hero/HeroAbilities for the attacks/abilities. (Hero/Interaction for how I handled interacting with doors etc.)

I managed to get it to feel decently good imo (although I should've added more attacks etc.) and I had full control do to awesome stuff (custom cooldown management and tweak all parameters) but it came with some complexity.
I made it so when you clicked one ability while doing one already, it queued it up. Some abilities allowed the next one to start before it was 100% done (the dash allowed attacks before it was 100% finished). This improved how it felt greatly!

Note that this took quite some time, but I'm proud of what I did (although I have not had inspiration to come back to the project since a few initial bug-fixes).
 
Top