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

cleaving attack as an active ability?

Status
Not open for further replies.

311

311

Level 4
Joined
May 12, 2019
Messages
73
How would I go about making an active ability out of cleave? or most of those passives, such as critical strike, Bash, Pulverize, Barrage.
Would it be something really difficult and JASS needed? Or something I would actually be able to do in GUI, as I know 0 JASS at all.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
What does that mean exactly? Activate to gain the passive component? Or an ability that when cast mimics an attack? Or do you want the passive ability to function like it normally would but have an active component as well? -> So it'd basically be an active ability with additional passive effects.

In regards to mimicking an attack completely, it's quite difficult if not near impossible to do so. That being said, you could probably get pretty close to what you want.

For critical strike, you could use an Ability that does nothing, let's say Forked Lightning with it's Art/Damage/Additional Targets set to none. Then use a trigger to detect when this ability is cast and get the attack damage of the caster using the Get damage base/number of dice/sides of dice functions. Once you have the damage calculated and stored in a variable, apply the critical strike multiplier to it. So do something like Set DamageVar = DamageVar * 2.00. Finally, you damage the target using the "Cause damage to target" function and use the DamageVar as the damage amount. You can also create red Floating Text above the target displaying DamageVar to mimic critical strike.

This wouldn't be an actual attack but it's probably the most simple method out there. Keep in mind that there's other methods of doing this and that each method could vary depending on the mechanics of the passive abiity.

Also, just about anything that you can do in Jass can be done in GUI, Custom script IS Jass after all, so that's not really an issue to worry about.
 
Last edited:

311

311

Level 4
Joined
May 12, 2019
Messages
73
I want it an active ability, so its not a % chance at all, basically, I would click the ability (cleave ) or (Critical strike) for example, I would choose a Target and it would cost mana / cooldown like any other active ability and then it would critical strike/cleave or whatever that target.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
Sorry, I lost track of this thread. Anyway, what you described is exactly what I said in my last post.

For critical strike, you could use an Ability that does nothing, let's say Forked Lightning with it's Art/Damage/Additional Targets set to none. Then use a trigger to detect when this ability is cast and get the attack damage of the caster using the Get damage base/number of dice/sides of dice functions. Once you have the damage calculated and stored in a variable, apply the critical strike multiplier to it. So do something like Set DamageVar = DamageVar * 2.00. Finally, you damage the target using the "Cause damage to target" function and use the DamageVar as the damage amount. You can also create red Floating Text above the target displaying DamageVar to mimic critical strike.

For cleave, you do something similar but get multiple targets instead of a single one. This can be done with Unit Groups and the Pick Every Unit function. Search Hive for information on triggering an Area of Effect spell to get a better understanding of this. If you want a cone effect for the radius of cleave then you'll probably have to use a Jass Snippet. I'm sure if you search for "Cone Jass Snippet" or something like that you'll find what I'm talking about. Basically, people have already created systems for cone effects, and they've designed them in a way that'll be fairly easy for you to implement into your map. Most of the time there's no coding knowledge required to use these systems besides writing a single line of Custom script in your trigger.
 
Last edited:

311

311

Level 4
Joined
May 12, 2019
Messages
73
k thanks, wasn't showing either of those 2 paragraphs before sorry.
 
Status
Not open for further replies.
Top