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

[General] Change Attack Type

Status
Not open for further replies.
Level 17
Joined
Jul 17, 2011
Messages
1,864
Here it is
View attachment 114038
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

did you even check this out? :vw_sad:
 
Level 16
Joined
May 2, 2011
Messages
1,345
@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...

Com'on, he was newbie. No need to be too harsh for new guys.
 
Level 37
Joined
Aug 14, 2006
Messages
7,601
did you even check this out? :vw_sad:
Sorry, I think I missed it. Fradz doesn't have ranged attack(only vs air units only which is not enough) so it's not what I wanted. :[

off-topic: that will never be an excuse... ^_^

@Aero - if you cannot really use it then maybe someone could do something like Nes' system in GUI...

Do we really need to make such a complicated systems for this? I really hope not, it's just one ability for one hero. :/
 
Level 2
Joined
May 18, 2012
Messages
10
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)

-no upgrd - I understand, why
-no other pl - ok
But why you cant use Illidans mod morph ability, just use copy of your melee hero (mod his attack stance, of course) as 2nd form. Its just like Troll Warlord in DoTa - same name, same abilities, but attack stance of 1st and 2nd form is different. All variables of trigs U link to hero in melee form must work fine with 2nd, range form. IMHO for TRIGGERS units will be the same, whatever they do in-game, even shape-form
 
Level 2
Joined
May 18, 2012
Messages
10
Sorry, I dont use Ids, so cant tell something more usefull in this situation v_v
Maybe some other solves can be find, but I really doesnt know about Id
 
Level 37
Joined
Aug 14, 2006
Messages
7,601
I don't know what Ids too but I definitely know that things will get really messed up if I change or duplicate heroes. :/

There are many, many systems that are only designed just for three heroes the campaign has. This is just an ability, I won't start to recreate systems so that I can use this idea.

More likely, I would move on and give up with this ability idea.
 
Level 2
Joined
May 18, 2012
Messages
10
If you will use Variables in triggers, it will make you map more comfortable, both to editor and to players. It will really solve many of your problems, that you already have or gonna meet in future. Rawcodes good for the objects, which is not supposed to be used many times. Just do this - in your Map initialize trig create a variable - unit type (its be usefu to call it My_Hero or somehow), then do Set variables - choose your new variable and then choose your hero. Thats all
 
Level 3
Joined
Mar 27, 2011
Messages
45
use unit classification.

make your hero have 2 attacks (in the unit editor).
The melee one can target everything but cannot target MECHANICAL and FLYING, for example (the FLYING is obliged, of course).
The lightning one can target ONLY mechanical, for example.

Every time you press your skill, make a trigger that removes EVERY unit classification from every unit in the map, then add the one/ones you want.

For example, i didn't switch, so my MELEE ATTACK doesn't target mechanicals (flying, in your map), but only ground units.

I use the skill, i pick every unit and i make them mechanical. Now i can't attack them anymore with the melee one, and the hero will automatically start to use the ranged one, because BOTH flying and ground units are MECHANICAL now.

I re-switch, i pick every unit and remove the MECHANICAL classification, so my ranged attack doesn't find suitable targets anymore, and the hero just starts attacking with the MELEE one.

That should work, i think.
 
Last edited:
Level 16
Joined
May 2, 2011
Messages
1,345
can you even remove classification in game? I just haven't bumped yet with that function... :)

it could work, but if its a hero, only one attack will show on the UI, if its the melee one, then the player will not know what the range of the ranged attack is...
changing description of attack would be fine, if the attack type is dedicated to the hero.
 
Level 3
Joined
Mar 27, 2011
Messages
45
It's more difficult than what i expected o_O, working on the test map right now

EDIT: for some strange reason it doesn't let me ADD classification while it does let me remove them, so it's not working.
I uploaded the test map maybe someone more skilled than me can figure it out.
 

Attachments

  • PROVA.w3x
    18 KB · Views: 38
Last edited:
I've found a way to do that :
Actually, you have to use the research ability of the rifleman
You have to make two of them
One add range to your unit (ex: 200), the other one remove this range (ex: -200)
There is one drawback : it is limited you can do it "only" 9999 times

I've made a test map :
http://www.hiveworkshop.com/forums/pastebin.php?id=o4q5ho
 
Last edited:
Level 33
Joined
Mar 27, 2008
Messages
8,035
Your test map is based on Upgrades, which is not related to my discussion, at all.
My discussion is about to add/remove certain classifications, while yours is about Upgrades, no, we're discussing 2 different things.

Btw, your approach is the most weak I have ever seen.
1000 levels ? Yeah right.

There might be Acquisition Range trick somewhere I saw vJASS did it, that would work more efficient.
 
Level 10
Joined
Jun 6, 2007
Messages
392
Here's one possible solution, I'm not sure if it will fit this situation though:

1. Make some unused player (referred X later) to share units with player 1
2. Create an upgrade with range bonus, uncheck the "transfers with ownership" field, and set level of that ability to 1 for player X.
3. When a unit uses an ability to gain range, set its ownership to player X.
4. When a unit uses an ability to gain melee attack, change its ownership back to player 1.
 
Status
Not open for further replies.
Top