Melee Unit attacks with ranged at the cost of mana

Running_dap

New Member
Reaction score
3
To make you understand, here is the thing:

There is a melee unit in my map (with the range of 100), that i need to make an ability that allows him to attack at a range (e.x. of 600) at the cost of mana. Is that possible?

NOTE: the ability has to been auto-active, that means that if the player turns it on, the unit will attack only on range (but still costs some mana per attack), and when he turns it off, it will again hit on melee.
 

Pharaoh_

The epic journey will soon begin... Prepare!
Reaction score
136
Get any auto-active spell that gives a buff to the caster and trigger it.

Code:
Trigger 1
  Events
Starts the effect of an ability
  Conditions
Ability being cast equal to X
Casting Unit has a buff (X) Equal to True
  Actions
Turn on Trigger2

Code:
Trigger 2 - NOT initially enabled
  Events
A unit attacks
  Conditions
  Actions
Set attack = (attacking unit)
Set Mana of attack to ((Mana of attack) - X))

(Epitelous, Ellinas :p)
 

Evoroth

New Member
Reaction score
11
Get any auto-active spell that gives a buff to the caster and trigger it.
(Epitelous, Ellinas :p)

You're not giving it range, you're just making an ability that makes your attacks cost mana. I wouldn't turn on that.

This could work:
Make the unit's 'attack 1 melee', and 'attack 2' ranged. Then give it [the destroyers purpleshot toggleable attackability]. I think, when you turn on that ability, it changes the unit's active attack to 'attack 2', and makes the attacks cost an amount of many you can specify in the ability stats.
 

Flow

New Member
Reaction score
4
Just took a look at the destroyer's ability, and it just gives bonus damage and AoE effect to it, it does not change the active ability of the unit.
 

XeNiM666

I lurk for pizza
Reaction score
138
try using Searing Arrows, its not an orb effect, and just set the casting range to Your range..

not sure though :p
 

Flow

New Member
Reaction score
4
If cast further away than the unit's regular attack's range, it'll cause the unit to miss. This goes for searing arrows as well as Orb of Annihilation, and the big money says it's the same with cold arrows, black arrow etc
 

BarzahdX

Active Member
Reaction score
18
I'm shocked I'm the first to give a right answer. :p

Base the ability off of Bear Form, set the alternate unit to have the same exact stats as yours, but have a 600 range, while triggering the mana cost.. An above poster already stated that trigger.

It's full-proof, 100% works. :)
 

Kiddo

New Member
Reaction score
12
I'm shocked I'm the first to give a right answer. :p

Base the ability off of Bear Form, set the alternate unit to have the same exact stats as yours, but have a 600 range, while triggering the mana cost.. An above poster already stated that trigger.

It's full-proof, 100% works. :)

Haha, I actually like that idea. :p Nice.

Kiddo.
 

Flow

New Member
Reaction score
4
Yeah, but I tend to prefer to use Chaos. Just personal preference :} I think it's a bad choice for this though, since he wants to use it for just an attack now and then, and bear form needs casting itself before the attack, and can't really be set to auto-cast in the traditional way.

Also, the one ability I can think of that changes the active attack of a unit is War Club. Might find some interesting stuff if you play around with that~
 

HydraRancher

Truth begins in lies
Reaction score
197
I aint sure how to do it :p but they did some sort of thing like war club before in Sotdrp Vanguard the spell RangedAttack u take a tree and your attacks become ranged. So it seems possible.
 

Running_dap

New Member
Reaction score
3
Sorry for not repling, but i didnt have much time lately.

First of all, all the abilities like Frost Arrows etc will indeed make the unit miss. Second of all, the bear-form idea wont work since it required to be casted first in order to attack (i need the unit to be able to range-attack whenever the player wants, not after casting an 'other' ability first). :(

thx for the replies though

EDIT: the problem with the war club, is that it needs a target to get the range attack working, it can't cost mana per attack and it ends after some strikes. :/
 

afisakov

You can change this now in User CP.
Reaction score
37
Second of all, the bear-form idea wont work since it required to be casted first in order to attack (i need the unit to be able to range-attack whenever the player wants, not after casting an 'other' ability first).

Not sure I see the problem with bear form, as long as u make the bear form a mirror image of the original unit with atk range as only difference and set mana cost to 0. If you set casting time to 0 or as close as game lets u, not more than .1, then using bear form will not be much different from activating auto-cast as said below.

the ability has to been auto-active, that means that if the player turns it on, the unit will attack

Then for the mana cost per attack just use a modified form of Pharoah's trigger, u can even have the bear form have the same name as the original except for an editor suffix not visible in the game.
Code:
  Events
A unit attacks
  Conditions
unit type of attacking unit equal to (ur unit in bear form)
  Actions
Set attack = (attacking unit)
Set Mana of attack to ((Mana of attack) - X))

Another slightly diff but similar way is to use tinker's ability to change form instead of bear form, which u prefer is up to u.
 

BarzahdX

Active Member
Reaction score
18
I'm sorry, I misunderstood your question.. Is there a way to disable attacks for a unit? You could make a trigger to disable attack 1, and enable attack 2 upon Order - searingarrowson as an example.

You have attack 1 have your stats, attack 2 same stats but 600 range, only attack 1 is enabled. Through triggers(if it's even possible) disable attack 1, and enable attack 2.. The mana cost on Searing Arrows would fulfill that purpose.

I know an above poster made reference to this.
 

Running_dap

New Member
Reaction score
3
Quote:
the ability has to be auto-active, that means that if the player turns it on, the unit will attack
Then for the mana cost per attack just use a modified form of Pharoah's trigger, u can even have the bear form have the same name as the original except for an editor suffix not visible in the game.

the ability HAS to be auto-active. i dont want anything that is "not much different to auto-active"...


I'm sorry, I misunderstood your question.. Is there a way to disable attacks for a unit? You could make a trigger to disable attack 1, and enable attack 2 upon Order - searingarrowson as an example.

You have attack 1 have your stats, attack 2 same stats but 600 range, only attack 1 is enabled. Through triggers(if it's even possible) disable attack 1, and enable attack 2.. The mana cost on Searing Arrows would fulfill that purpose.

I know an above poster made reference to this.
didnt know that u can disable attack 1, or enable it from triggers... i'll check it when i can
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top