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

[General] Change Attack Type

Status
Not open for further replies.
Level 37
Joined
Aug 14, 2006
Messages
7,602
Hey.

I'm searching a way to do an ability that changes Hero's attack type from melee to ranged and opposite. I found one way, using Bear Transformation, but that way I have to create two different units which is not an option.

You might have ideas?

Map where I use the Bear Transformation is attached and also the model I use for the attack type switching.

Rep & credits for the helpers.
 

Attachments

  • Transformation.w3x
    159.3 KB · Views: 76
Last edited:
Level 11
Joined
Feb 14, 2009
Messages
884
I found this, which is pretty old but DSG has a solution. Not ideal, I know, but still a solution. Also, you could try using an edited "Improved Bows" upgrade from the Night Elves, though I don't know if you can degrade the ability to melee later.
 
Level 37
Joined
Aug 14, 2006
Messages
7,602
it looks nice. I don't realy know whats the problem with this. Its not a big deal making 2 units as spending your day to overcomplicate a simple thing

IMO leave it as it is

The campaign is build in a way that only 1 Hero.


I found this, which is pretty old but DSG has a solution. Not ideal, I know, but still a solution. Also, you could try using an edited "Improved Bows" upgrade from the Night Elves, though I don't know if you can degrade the ability to melee later.

Upgrades is not a good idea because eventually you'll run out of them and then you can't anymore change the attack stance. :(
 
Level 37
Joined
Aug 14, 2006
Messages
7,602
Every unit has 2 attacks. What about making one melee and the other one ranged?

I said no 2 units.

maker did a system like that you should check it

Oh yes I remember something. It was with the orbs... But I just need the attack type changer with this ability only.

No need such a complicated system. Let's go with simple GUI and possible one trigger.
 
Level 12
Joined
Oct 16, 2010
Messages
680
The campaign is build in a way that only 1 Hero.

making a unit and an other one for the spell does not count as the player has 2 heros...
also Ezekiel12 told u not to make a melee and a ranged unit but to set ONE units premier and secunder attack type

but it won't work cuz its only for separating target types like ground to be attacked with attack 1
and maybe if the target is air unit than attacking it with attack2

but its useless to u

still think u should leave it as it is
 
- you cant transform 1 hero into 2 different beings without creating 2 or more units...
- the only way to do 1 hero is to use item orb attack bonus which enables the second
attack, but it can only be enabled if the target is unreachable from the first attack...
- you may just want to trigger it all for the ranged attack and use auto spell that has range...
 
Level 11
Joined
Mar 31, 2009
Messages
732
Try messing with this, let me know if you can get a way to apply it to an ability.
 

Attachments

  • berserkerstrength.png
    berserkerstrength.png
    76.3 KB · Views: 161
•Abun (Cargo Hold): If added to a unit it disables the unit's ability to attack other units. Even the attack icon and shortcut are removed from the command card. To enable the attack again simply remove the cargo hold ability. Together with orb abilities it should give you complete control over the attack indices of units.

If you require a testmap/example, please ask for one. :thumbs_up:

Oh, and I don't usually pay attention to threads so I suggest asking in visitor messages.

Going to double-check just incase, thought it worked.
 
Last edited:

sentrywiz

S

sentrywiz

Possible solutions:

1) Two units (you already said no)
2) Replace unit (again, two units different approach)
3) There was an item ability that gives the unit increased range, maybe it could go into negative value.
4) Making the unit blind, keeping the same attack but reducing the sight range, causing the unit to have to come closer in order to attack (same as above different approach)
 
Level 16
Joined
May 2, 2011
Messages
1,351
I do not understand why you can not use this? under your conditions of course.

  • Player - Set the current research level of Improved Bows to 1 for Player X
  • comment - ------------------------------------------------------------
  • Player - Set the current research level of Improved Bows to 0 for Player X
easy huh? it is not my Idea, some one said it before.
 
Level 16
Joined
May 2, 2011
Messages
1,351
ok, I have something that may work. If the game is less than 12 players:
1- make new empty player ally of the hero.
2- make it full shared units control.
3- upgrade that long bow or whatever to the controller player. Do not upgrade it for the empty new made player.
4- alternate the hero between the empty player and the controller player to change the range.
5- make sure Exp is shared. Find yourself a way: map constants, trigger...

What do you think?
 
I said no 2 units.

You said no to 2 units, he said nothing about 2 units. But he said nothing how to do it, too. I suggest you to make a dummy unit casting modified silence, which will disable one attack. You can do it this way:

attack one: ranged
attack two: melee
enable attack: both

On default it will use only ranged attack. When you use that ability, a dummy unit is created which casts silence with very small radius and very long duration and with disable ranged instead of melee. After you use the ability to regain the ranged melee attack again, you just remove the buff.
 
if the melee and ranged attack have the same targets then using Attack 1 and attack two won't work... orbs can only enable an attack index but not disable, so the unit will have both melee and ranged attacks, then since they have the same targets, only one of them will activate...

Btw, Nes made a script for customizing unit attack range, you can use it to apply this kind of effect...
 
Level 37
Joined
Aug 14, 2006
Messages
7,602
Okay, nice so you use orbs. Now I need you to help me to finish this ability:

Change Stance (based on Defend ability from Footmen)

1) Melee Stance - When activated, Fradz uses his swords to slice his enemies.
2) Ranged Stance - When activated, Fradz throws lightning balls from his hands.

Melee Stance can only attack ground enemies, but Ranged Stance can attack both ground and flying enemies.

I would be really grateful, if someone here knows a trick how to do this and provides me a working test map. It would be very, very nice ability for the campaign I'm creating. It would simply create a completely new tactical element to the gameplay.

(map is attached to this post)
 

Attachments

  • Transformation 0.02.w3x
    160.3 KB · Views: 172
Last edited:
Level 17
Joined
Jul 17, 2011
Messages
1,863
Here it is
View attachment Transformation 0.02.w3x
just make sure that whatever ability you have for variable Ability1 your hero has as well
there is also another way to disable melle attack so that the hero can only attack air but this should do for now oh and its not based on footman ability its a bit more complex since i do not know of a way to detect when Defend is cast
this can work with only one ability but then you would not have an icon change
 
Last edited:
since the melee and ranged form [attack 1 and 2] both have ground targets, when you attack a ground unit, it could be the melee attack or the range attack that will activate (I'm just not sure which one takes precedence). as for air targets, since only attack 2 has the air target then it will always be the ranged one that will hit the air enemies...
 
Level 16
Joined
May 2, 2011
Messages
1,351
why do you not do my solution. It is very simple. you just have to make sure of one thing: make sure that the upgrade does not transfer with unit change in ownership or so.

I mean all enemy damages are only to player 1.
make for player 1 and the other player. Some times you have to rework the system in different way, even if you want to get similar result.

what I tested is:
  1. have footman
  2. upgrade iron forged sword
  3. use banshee to possess him
  4. you will notice that his damage is no longer upgraded.
 
Last edited:
But he needs the unit to be able to change between melee and ranged WHENEVER HE WANTS, which upgrades cannot do...

and as Aero said on the first page:

Aeroblyctos said:
Upgrades is not a good idea because eventually you'll run out of them and then you can't anymore change the attack stance. :(

See? right from the start he doesn't want to use UPGRADES and now ur asking why he wouldn't do your suggestion? At least read the first page...

and on the second page he also re-emphasized that point:

Aeroblyctos said:
So does anyone here know a way to do this?

- No upgrades
- No unit replacing / new units

Conclusion?

Don't tell him to use upgrades because that is certainly not a good idea... it will empose lots of limitations...

You could always use: http://www.hiveworkshop.com/forums/submissions-414/system-unit-attack-213779/ for this...

basically you set the attack range of the unit to whatever you want, whenever you want...
 
Level 16
Joined
May 2, 2011
Messages
1,351
Upgrades is not a good idea because eventually you'll run out of them and then you can't anymore change the attack stance. :(
but altering the unit between two players will only need few upgrades levels: if he/she want X number of ranges, he/she will need X-1 number of upgrades only, and X number of players...

Illustrating example:
I have night elf archer + long bows upgraded=> range = 800
you use dark ranger to charm the unit+ you don't have the upgrade=> you take the unit+ range = 500

Edit: that is only if the field: stats-transfer with unti ownership = false
 
Last edited:
I get it that you suggest him sending the unit into another player in which control is shared to switch between melee and range, it could and would work... Something like Melee = owned by him, Ranged = owned by a "dummy" player...

But what if there is a system in the map in which the data is tied for the owning player? It would cause a problem now... and also, if he needs the statistics, it will also cause errors since one mode of the unit is owned by him, the other is owned by the other player... What if he has an ability on other units which is supposed to only target units that he owns? since the ownership changes between modes, then he won't be able to cast that ability onto his unit while in the mode that is owned by the "dummy" player... and so on...

Using upgrades will impose the need for him to make sure that none of those things are present at the map, which is why its not a good idea...

And giving him a more universal solution is better in case he wants to do this again in another map... because right now, your solution will be limited by the number of players that are actually playable... What if he decides to do this on a map where all player slots are used? then he will ask the same question again because clearly he won't have any available "dummy" player, and that is something I would like to prevent...

It would also help other people who is actually searching for the same system... If someone asks for something like this, then we could just redirect them to this thread...
 
Level 37
Joined
Aug 14, 2006
Messages
7,602
Ah, well. I guess it starts to be impossible.

I'm looking for something very simple that hopefully can be done with GUI. It doesn't need to be MUI or anything, it's just for one hero. I guess I'll PM Maker if he possible knows a way to do this.

- No upgrades(because cannot undo)
- No unit replacing / new units(the campaign is build only for 1x type of hero)
- No other players(campaign is build only for player 1 and neutral hostile)
 
@Newbie100 - reported for spam, thread hi-jack post...

@Aeroblyctos - I think designer's method could work fine, it will still be player 1 and neutral hostile that will be fighting since the other player will just be a "dummy", just so you can switch between melee and ranged modes... in case that you don't want him to show at the score screen, you can disable a player from showing there...
 
Status
Not open for further replies.
Top