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

Flying heroes and transforming abilities

Status
Not open for further replies.
Level 2
Joined
Apr 2, 2019
Messages
11
Hello. Thank you for taking the time to look at this thread.

I have a map with an item which allows heroes to fly. It works properly for all heroes except the ones that already transform: g alchemist, DH, MK, tinker. This might be difficult to explain but basically when you pick up the boots with let's say a blademaster, you get a flying blademaster with the ability "fly" not on the item but rather as an actively used ability. I did this because it was easy to make a "fly" ability for each hero which allows them to transition up and down without anything complex (I know I could just use triggers to remove their collision and just raise/lower them, but then melee heroes will attack ground units up close, and won't be able to hit air - also i want them to need an orb to hit ground units from the air anyway).

I used the crow form ability for the boots.

The two abilities (fly and tinker ult) do not appear to get confused, for instance when I use one, it does not highlight the other or put the other in cooldown, or appear to use it.

The problem is I can't get the tinker, or any transforming hero, to forget their transforming hero ability when they go from flying to landing and vice versa. I need the flying tinker to, when he chooses to land, forget his flying ultimate and auto learn his landed ultimate. A (flying) tinker who uses his ultimate always ends up in the sky, even though the "flying flying" and the "walking flying" versions of the tinker have their own ultimate but I can't get them to switch with triggers. I have tried using triggers multiple ways, but for some reason can't even seem to detect when a hero learns the ability. I will show my latest attempt at getting it to work below, and the map is attached if you want to see it happening and try some things with it yourself :).


I apologize if this effort seem a little lacking it is 4am and I've deleted all the failed attempted. This thread is not exactly designed to have these particular triggers examined, rather to spark new ideas or give suggestions on how to create this in a way that will work; however here they are anyway.
upload_2019-12-10_5-2-42.png

I have it in two triggers
upload_2019-12-10_5-2-59.png

attached is the map if you would like to take a closer look at it and maybe test a few things out. The boots are in the bottom section of the shop that spawns next to the player.

There are two triggers, titled "a unit acquires an item" and "a unit loses an item", which play an important role in replacing the heroes when acquiring and losing the item, but they're not related to the difficulties i am having (i am almost certain).

PS my editor skills are limited but i love to make maps. I have worked a lot on this map but keep running into little snags and the like. If you decide to open this map up and you like what you see, and have the free time, send me a dm and we can talk about working on it together :)
 

Attachments

  • banana bread.w3x
    4.2 MB · Views: 68
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,537
Try using the Event "A unit starts the effect of an ability" instead of "A unit begins casting ability".

Begins casting an ability runs before the ability actually "casts", allowing you to do things like interrupt the cast. Starts the effect of an ability runs when an ability goes on cooldown (or when it WOULD go on cooldown if it's cooldown is set to 0). 9 times out of 10 people use Begins casting when they really wanted to use Starts the effect.

I don't know if that'll fix the current problem but it might help with some of your other triggers.

Anyway, hopefully sometime in the future this Action will become usable (currently doesn't work):
  • Unit - Set Unit: (Triggering unit)'s Integer Field: Type ('umvt') to Value: 1
It's supposed to change the unit's Movement Type.
 
Level 2
Joined
Apr 2, 2019
Messages
11
I know right know this particular arrangement won't really work, I am more or less trying to get some ideas from people more experienced on other ways to do this or what else needs to be done because there are some other big pieces missing in this that I don't know about. I do appreciate the insight towards "A unit starts the effect of an ability".
 
Level 24
Joined
Nov 9, 2006
Messages
2,558
Add crow form ability via spellbook and hide the spellbook with the function from "action - players - disable/enable ability".
This lets you adjust the flying height of those units.
Keep in mind the unit is still considered a ground unit when being attacked.
You can change this too with a function from "actions - units - set integer data <target as>".
Now you can change the unit to being attacked as an air unit.

I'm not sure if this method changes movement method, but worth a shot.
 
Level 2
Joined
Apr 2, 2019
Messages
11
They already have the crow form ability that I am using to adjust the height of the units and they are attacking ground and air/being attacked by ground and air properly already. That part is working fine. What I need is for the tinker and all transforming heroes to have it's ultimate/transform ability removed and replaced when it uses crow ability to either land or fly. There is an air version of the robo tinker, and a land version. I need for the tinker to know which to transform into based on whether it is already in the air or not. The ability is not being replaced on the hero when I try with triggers and that is what I need. Thanks I edited my post to include that I used crow form already, it was early when I wrote the post and I missed some details like that.

The map is attached if you want to see it happening and maybe try to cook something up.

PS "Keep in mind the unit is still considered a ground unit when being attacked." if you set the the crow form ability's alternate unit's "combat - targeted as" to "air", it will be targeted as air.
 
Last edited:
Level 39
Joined
Feb 27, 2007
Messages
5,010
Add crow form ability via spellbook and hide the spellbook
For the crow form trick to work it just has to be added to and removed from the unit, doesn't have to exist on it permanently. And it doesn't have to be in a spellbook. Also we can disable abilities directly now so the hidden spellbook workaround isn't needed either. :)

PS "Keep in mind the unit is still considered a ground unit when being attacked." if you set the the crow form ability's alternate unit's "combat - targeted as" to "air", it will be targeted as air.
Yes, if you actually activate the crow form ability to transform into a different unit type the unit will absolutely be treated as the new type should be. What Nudl9 is suggesting you do doesn't involve activating the ability to do a transformation, just giving it to the unit (and then removing it) which allows you to set fly height anyway even if it's not an air unit. But it will still be the same ground unit it started as, not some other form.
 
Level 2
Joined
Apr 2, 2019
Messages
11
I see. I do appreciate the clarification on that, although I am still slightly confused. If I use this on a blademaster for example I understand you've stated I need to change it's "targeted as" tag, but how will I get the blademaster to naively attack air with it's melee, and require an orb for ground? I may end up switching to something like this if it does everything as intended. But I also question if it will even put the transformed tinker at the correct height when the tinker transform is used, which is the entire point of this post. I already have flying heroes who are properly attacked by ground and air, and properly attacking ground and air.

However, I did ask for ideas and I have not tried this trick before and would just go try and see if I could get this to work with with the tinker and other transforming heroes somehow instead of asking first however I am confused how the unit will fly/land at will if the ability is hidden and I am not exactly sure I won't mess it up. Also I don't think it will change anything for the tinker or transforming heroes, I don't see how this would be any different than what I have other than: the hero wouldn't actually transform it will only change heights (but does it "fly" like over water?), the icon would be hidden/I would not be able to use fly/land at will, I will need to change tags, and I am not sure if it will properly attack air and ground since it is still the same old ground unit?
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,537
What they're talking about is a method that lets you adjust the flying height of a ground unit with the Action "Change unit flying height". Normally this Action only works for flying units but if you add the Storm Crow Form ability to a ground unit (you don't even have to cast it) then the unit will be able to use the "Change unit flying height" Action for the rest of the game. The trick is to add the ability to a unit when it is first created, then immediately remove it. This happens instantaneously and the player will never even know the unit had the ability in the first place. Why do we have to use this weird trick? Ask Blizzard, lol.

The thing is, this Action is purely visual. The unit's movement type isn't changed so the unit will still be considered a Ground unit. I imagine your best option would be to use a combination of:
1) Turn off unit collision
2) Change flying height (use the storm crow trick)
3) Modify Targeting Types

Edit: Turn off unit collision allows the unit the move out of map bounds.
 
Last edited:
Level 2
Joined
Apr 2, 2019
Messages
11
What is risky with turning off unit collision? This sounds like I could possibly use it but (as mentioned in original post) I didn't really want to do it this way. I didn't know I had to give it crow form if I wanted to adjust the height first, but other than that I did basically have this exact idea but I didn't do it because I didn't know I could change the target types. One more time for clarity please, I understand I can change the "target as" with triggers and would be required to (I didn't know I could do that before but since being told I have searched for and found it), but can I change what the flying hero attacks with it's attack 1 and attack 2 by trigger(i searched in all the "set" areas, and looked around a little but didn't see anything)? Thank you.
 
Status
Not open for further replies.
Top