• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Training Unit Radius For a Building - "Unit has no room to be placed" (Water)

Status
Not open for further replies.
Level 13
Joined
Jun 9, 2008
Messages
262
Looked around for a bit but didn't see this adressed anywhere so far.

You get a "unit has no room to be placed" message if you, say, train a swimming unit and the structure is too far away from the water.

My question is, where can you change that radius? Is it entirely dependent on the size stats of the building (will always try to spawn at least at the edge of pathing map), or is there some other way to change this?

The goal is to have a building like 99999 distance units away from the nearest shore and yet training a ship unit still works.
 
Last edited:
Level 13
Joined
Jun 9, 2008
Messages
262
So anyway here is the workaround I have settled on for now

d0504bda279b4e1ad48a02d9bcc910d326fb43d0.jpg


Plus of course the clean-up triggers that go with it with training canceled or finished etc.
 
Level 20
Joined
Apr 12, 2018
Messages
494
I don't suppose there's a reason you have two identical If-then-else actions in there?

Well, that and the two (Last created unit) related actions outside the If-then-else don't do anything if you don't satisfy the if statement.
 
Level 13
Joined
Jun 9, 2008
Messages
262
I don't suppose there's a reason you have two identical If-then-else actions in there?

Well, that and the two (Last created unit) related actions outside the If-then-else don't do anything if you don't satisfy the if statement.
That's only superficial: the two ifthenelse work with different unit types that just have the exact same names.
The second part is valid though, that's a leftover from a previous version of the trigger where I tried something else.

(I also cut parts of the trigger here to make it short, but it should still show what it does, overall)

Just in case, Did you know that "Triggering unit" reffers to the unit that creates the trained unit not the trained unit?
Yupp. Visually, it looks maybe a bit clunky though because literally the training building flies all over the map floating over the destination as a ghostly version of itself, but that's the only way I found so far to make it work and looks semi-plausible (it's symbolic, you see? :p).

The problem here, as I see it, is that unless the building itself is near water (and again, how do you define "near water", outside that silly "Pathing - Placement Requires Water Radius" that does nothing useful here?) , the training of the unit never even completes so you can't really have a good "Event".
So you kinda got to bring the building to the water, which sucks...
 
Last edited:
Level 13
Joined
Jun 9, 2008
Messages
262
For reference, here is what it now looks like when you try to summon a naval hero:
313625c10955c22e0fd8c2a7f388379ce167c594.jpg


At least I tested it all and it seems to work. As they say, not pretty, but at least rare...

The clean-up triggers are horrifying too, btw - What happens if the port is destroyed before the summoning ends? What if the dummy unit is destroyed? What happens if you cancel? All of that needs to be thought through and makes for pages worth of triggers...
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,597
A possible cleaner solution would be to have non-Water versions of each ship that you can train from the port. Then detect when these are trained and replace them with their Water-based versions, finally moving them to where they need to be.
 
Level 13
Joined
Jun 9, 2008
Messages
262
A possible cleaner solution would be to have non-Water versions of each ship that you can train from the port. Then detect when these are trained and replace them with their Water-based versions, finally moving them to where they need to be.
I considered that, but then you also have to account for the fact that those are hero units and you want to keep with the "limited to one per type". Feasible of course
 
Status
Not open for further replies.
Top