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

"Remove Classification: Structure" - Doesn't work?

Status
Not open for further replies.
Level 6
Joined
Jul 29, 2011
Messages
90
Hello. So I have a unit that upgrades into other various units, but it won't display a progress bar on those upgrades unless both the initial unit and potential upgrade units have "Is a Building" set to "True" in their respective field entry pages in the Unit Editor.

I've tried triggering it for a "Remove Unit Classification: Structure" of triggering unit when the upgrade finishes, and even also using "Add Unit Classification: Ground Unit", but it doesn't seem to work, and I can't find any other commands that seem like they might be viable for this purpose. All of the other commands in the trigger for upgrade completion go off, so I know that the conditions are correct.

Basically, what I need to know is what Action command do I need to use in order to change the "Is a Building: True" field into "Is a Building: False".

Thanks so much to anyone who can help with this.

EDIT: I've also tried ticking "Is a Building" to "False" from the get-go, and using "Add Unit Classification: Structure" at the beginning of the upgrade, and then removing it at the end of the upgrade, and while that does make it so that the unit doesn't seem to count as a structure anymore after upgrade, it also doesn't seem to count as a structure during the upgrade, insofar as that it won't display the progress bar during the upgrade process. So I'm really friggin' confused here.
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
Yes, unfortunately that add/remove classfiction doesn't work well usually.
 
Level 6
Joined
Jul 29, 2011
Messages
90
Can I ask why you need the unit to be a building in order to show a progress bar? Can't you just remove that condition?

I have absolutely no idea. Ask Blizzard. It just doesn't work as units. No progress bar will show unless they're both (starting unit and upgrade target unit) set to buildings. There's just "nothing" in the info window of the selected unit during this process other than just the unit's name at the top, everything else in the window is just empty until the unit is finished unless they're buildings. It's not something that I really want to have to do this way, I just do because Blizzard. lol.
EDIT: It's not a condition that I set, so I can't remove it. It's simply the way the editor works. I either have to settle with there being no progress bar during the upgrade, or I have to find some kind of way around this structure classification thing.

I don't think there's any way to change classification through the trigger editor, unfortunately. Once you set the classification in Object Editor, it can't be changed in-game.
Yes, unfortunately that add/remove classfiction doesn't work well usually.
Surely there must be some kind of custom script I can use, or something?

EDIT: I'm thinking that maybe I can have two copies of each unit, one that's a building, and one that isn't, but otherwise identical, and then just replace the building unit with the non-building unit after upgrade, but I'd rather not do this, because then I'm pretty sure that this will result in the scorescreen reading as 0 units trained, and waaaay more structures trained than ought to be listed. Maybe that scoring can be manually subtracted/added in the trigger editor? If so, then that might work. Thoughts?
 
Last edited:
Level 12
Joined
Nov 3, 2013
Messages
989
Can't you make it train units instead and remove it when it finishes? Or does this also not show a progress bar?

Maybe it could be a building that is 'uprooted' to make it classify as a building but still be able to move.
 
Level 6
Joined
Jul 29, 2011
Messages
90
Can't you make it train units instead and remove it when it finishes? Or does this also not show a progress bar?
This was actually my first inclination, but I quickly realized that this wouldn't really work out. Namely because this would cause the hatching unit to birth next to it's collapsing egg instead of out of of it, and perhaps more importantly, this would absolutely destroy the functionality of my rally triggers. The key of the egg being the same key as the unit hatching from the egg is absolutely essential for my rally trigger to function properly, and I've been thinking about it for days, and I cannot come up with any different way of doing it.

Maybe it could be a building that is 'uprooted' to make it classify as a building but still be able to move.
That might work, but it would still have a pretty big problem: If you hover a selection square over units and buildings, the just-units will take priority over buildings or uprooted Ancients. Further, I'm pretty sure that because an uprooted Ancient is still a structure, you cannot have it selected at the same time as any other units that don't share the same unit-type as itself. This also doesn't solve the problem of having all of those trained "units" being represented as "structures built" in the scorescreen (not to mention being counted as "structured razed" when they die).

However, I'm pleased to say that this shouldn't be an issue. Right now, I'm actually working on writing in a series of triggers for this very purpose which I found from this thread. It does have this extra feature of only being able to upgrade when the units are within range of a particular required unit, but because I can't figure out how to get rid of that part of the code (it's a little advanced for me!), I've just changed the required unit to itself and changed the range to 1. lol. Worked like a friggin' charm when I tested the modification on the map that I downloaded from the second page of that thread (the first map download posted on page 2), so I think it's safe to say that this problem is officially solved. It still doesn't display the progress bar in the unit information window (bottom middle of the screen in the UI), but it does show the progress bar above the unit's head, even while the unit's not targeted! Which is even better. ^_^
 
Status
Not open for further replies.
Top