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

Giving Siege Engine Barrage a cooldown?

Status
Not open for further replies.
Level 1
Joined
May 29, 2017
Messages
3
So, I'm studying a bit of the basic in the world editor and messing around just for fun and decided to make some imbalanced changes to the normal melee units just to see how this new game would be.

I just started, but already got stuck in my flying machine: I tried giving it barrage/split shot with a cooldown. I managed to make barrage work on it and shoot even structures as I had intended but I can't find a way to put a cooldown on it. I tried the OoL method, because it's a single unit using an onAttack procc but that doesn't change anything (other than allowed me to change the projectile art for the main shot)

Is there even a way to do so?

Disclaimer: I really suck on triggers, coding and even some files names, I literally just started playing around with this kind of map making
 
What I had in mind was to create a hidden barrage and a dummy ability based on that barrage. What the dummy ability does is show you the cooldown of the hidden barrage while simultaneously running a timer with the exact duration based on the object data. When the timer expires, add the ability to the unit, and when the unit has successfully cast its' backswing animation when attacking, remove the ability.

To be honest, this seems quite complex for you to do, but that's jut my point of view.
 
Level 1
Joined
May 29, 2017
Messages
3
Maybe man, thanks for the reply!

Could you do it though? I'm actually very interested in learning that kind of stuff, so if you or someone else could just put it together on a blank map for me to see it, I'd really appreciate it.

Really just need a "look in the triggers" kind of note

Also gonna leave it open a little bit more, just in case someone else will be able to help me more
 
Level 21
Joined
Dec 4, 2007
Messages
1,480
So you want to replicate DotA's Flak Cannon ability.

It's based on a dummy ability (to show cooldown) and adds barrage + an expiration timer, which removes the barrage ability once it runs out.

It's very easy to make, just google a little more.
 
Level 1
Joined
May 29, 2017
Messages
3
So, a dummy ability to Trigger an upgrade (adding barrage), this upgrade expires on a timer, on the expiring of the timer a new trigger removing the barrage?

Also, is there a way to make it work for a set amount of attacks, in my case 1?
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
You'll need a damage detection system to know when a number of attacks has happened, because, if you use the event, " A Unit is Attacked " a unit can cancel their attack and it would improperly remove the effect.

Also it's not really triggering an upgrade, it's more the barrage ability is added when necessary and removed when not, an upgrade cannot be "un-upgraded" so that is the reason for adding and removing.
 
Status
Not open for further replies.
Top