• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Combo system(using keyboard to attack)

Status
Not open for further replies.
Hello. I don't know if this should be in requests or help so I'll just put this here. I need help on making a system where the player uses the keyboard to attack enemies. It would be like this: There would be no auto attack, the player uses for example the "A" key to play the unit's attack animation which will damage the unit it's facing. I know there is a damage detection system in the spells section so I'll use that too. There was also a system like this in the project http://www.hiveworkshop.com/forums/map-development-202/gintara-pirates-tale-86568/

Thanks in advance!
 
Level 7
Joined
Jun 14, 2009
Messages
235
Hello. I don't know if this should be in requests or help so I'll just put this here. I need help on making a system where the player uses the keyboard to attack enemies. It would be like this: There would be no auto attack, the player uses for example the "A" key to play the unit's attack animation which will damage the unit it's facing. I know there is a damage detection system in the spells section so I'll use that too. There was also a system like this in the project http://www.hiveworkshop.com/forums/map-development-202/gintara-pirates-tale-86568/

Thanks in advance!

I would assume you would remove the attack ability, and replace it with one you can custom script. Make the ability a no target spell (like thunder clap etc.)

  • Slice
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Slice
    • Actions
      • Animation - Play (Triggering unit)'s attack animation
      • ---Do stuff here---
 
I would assume you would remove the attack ability, and replace it with one you can custom script. Make the ability a no target spell (like thunder clap etc.)

  • Slice
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Slice
    • Actions
      • Animation - Play (Triggering unit)'s attack animation
      • ---Do stuff here---
I still do not understand what to do. I do not know how to do custom scripts because I never used it and the thunder clap ability would damage units around the main unit as well. I need to to damage the units the main unit is facing.
 
Level 7
Joined
Jun 14, 2009
Messages
235
I still do not understand what to do. I do not know how to do custom scripts because I never used it and the thunder clap ability would damage units around the main unit as well. I need to to damage the units the main unit is facing.

It is my understanding, you want something like "when you activate an ability (aka, press the ability hotkey), it will preform an action", such as slash in front of you, or shoot something in a direction.

Am i correct?
 
Level 11
Joined
May 26, 2009
Messages
760
It is my understanding, you want something like "when you activate an ability (aka, press the ability hotkey), it will preform an action", such as slash in front of you, or shoot something in a direction.

Am i correct?

I tested the map he referred to (great map by the way) and yes that is the way he would want it.

I believe the Gintara uses Channel - Instant (No Target) then trigger the rest, like Killd0zer did. I'm not too good with triggers and can't figure out exactly how he limits the damage area to only in-front of the unit but I know it can be done.

You do not necessarily need to use the 'custom script' function, but it improves the trigger quality so to speak, less leaking etc.
 
Level 7
Joined
Jun 14, 2009
Messages
235
I tested the map he referred to (great map by the way) and yes that is the way he would want it.

I believe the Gintara uses Channel - Instant (No Target) then trigger the rest, like Killd0zer did. I'm not too good with triggers and can't figure out exactly how he limits the damage area to only in-front of the unit but I know it can be done.

You do not necessarily need to use the 'custom script' function, but it improves the trigger quality so to speak, less leaking etc.

I don't really have the time to test the map, however i assume that it would pick an area in front of the caster, then deal damage/effects accordingly

But you (OP) need to do is make a dummy spell, a spell with essentially no data in the Object Editor (except tool tips, etc), then you use triggers to make it do what you want.
 
I believe the Gintara uses Channel - Instant (No Target) then trigger the rest, like Killd0zer did. I'm not too good with triggers and can't figure out exactly how he limits the damage area to only in-front of the unit but I know it can be done.

Well I am not very experienced with these kind of triggers, I have never worked with the channel spell either.

It is my understanding, you want something like "when you activate an ability (aka, press the ability hotkey), it will preform an action", such as slash in front of you, or shoot something in a direction.

Am i correct?
Yes
 
Level 7
Joined
Jun 14, 2009
Messages
235
Well I am not very experienced with these kind of triggers, I have never worked with the channel spell either.

Yes

then you will need to make custom spells using the trigger editor, and if you wish to make combos, do what GhostThruster said.

essentially you make a copy of a spell (like thunder clap, any spell with no point) then wipe all values in it like damage etc (channel is the best option), then you use triggers to make what you want to happen.

http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/basics-trigger-enhancing-spells-7334/
 
Level 7
Joined
Jun 6, 2010
Messages
224
i use 'Fan of Knives' for the dummy ability, put everything to '0' and 'none', then i do triggering, pick the unit in front of the caster spell and then do damage.

the problem is the sound and damage of the attack, it's not syncronizing the Attacker.

that's why the damage done has to have a weapon type ;)

UnitDamageTarget(Attacker, Victim, Damage, false, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_HEAVY_SLICE)

if it doesn't work you'll need to attach a sound to the victim that takes damage.
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
that's why the damage done has to have a weapon type ;)

UnitDamageTarget(Attacker, Victim, Damage, false, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_HEAVY_SLICE)

if it doesn't work you'll need to attach a sound to the victim that takes damage.

I forgot to say that my issue is ranged weapon like 'guns', Gintara's attack is much simplier since its a melee, but I already solve this issue. It's too difficult though to have an attack based on ability :)
 
Status
Not open for further replies.
Top