Ship/Hover transports - loaded units seen under map

Ship/Hover transports - loaded units seen under map

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
User avatar
PepeAmpere
Posts: 591
Joined: 03 Jun 2010, 01:28

Ship/Hover transports - loaded units seen under map

Post by PepeAmpere »

It happends if I use transport ship or transport hover and load some unit with "reload" bar ---> that bar appears still.. as you can see on example image like under the map.

Is this matter of game developer (that should find some widget and kill the bar if unit is loaded) OR is this engine issue?

thx.

Reproduce steps:
  • NOTA + Spring 89.0
  • /cheat
  • /give 1 coraat ..........in water, transport ship
  • /give 1 cortraq ..........unit with nukemine bar
  • load cortrag to coraat
Attachments
loaded_unit_example.jpg
Unit bar appears under the map and move with transport unit
(116.13 KiB) Downloaded 3 times
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Ship/Hover transports - loaded units seen under map

Post by knorke »

I think mode issue.
when transports load something, that unit is attached to some piece of the transporter.
afaik there is nothing in engine to make loaded passengers invisible so some mods do it by moving that piece with the passenger under the map. Try Spring.SetUnitNoDraw or adding something in healthbars widget.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Ship/Hover transports - loaded units seen under map

Post by zwzsg »

knorke wrote:I think mode issue.
when transports load something, that unit is attached to some piece of the transporter.
afaik there is nothing in engine to make loaded passengers invisible so some mods do it by moving that piece with the passenger under the map. Try Spring.SetUnitNoDraw or adding something in healthbars widget.
No. Moving the loaded units far below the map is an engine thing. When you attach a unit to the piece 0 - 1, the -1 is understood as a special value that means "don't draw the loaded" unit. But instead of not drawing the unit like in TotalA engine, the Spring engine simply move it out of view.

Having the healthbar detect such units an no draw the healthbar in that case would be the correct fix. Isn't there some version of the healthbar widget with that fix already?

Spring.SetUnitNoDraw should not be the responsability of the widget.
User avatar
PepeAmpere
Posts: 591
Joined: 03 Jun 2010, 01:28

Re: Ship/Hover transports - loaded units seen under map

Post by PepeAmpere »

Thx zwzsg, ive bet on this.

I was checking the healtbars widget and the problem is: the spring returns units loaded in ship/hover in this call:

Spring.GetVisibleUnits

Showing bar depends on list of visible units, where units loaded in ships and hover should not be I think.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Ship/Hover transports - loaded units seen under map

Post by knorke »

ah ok, interessting to know with the -1 piece thing,
result is kind of the same though as using a subterrain piece.
Spring.SetUnitNoDraw should not be the responsability of the widget.
I mean in unitscript or gadget.
If the unit is hidden with Spring.SetUnitNoDraw then Spring.GetVisibleUnits will not pick it up.

Another widget that accidently draws stuff for subterrain passengers is "blob shadows":
Image
There might be more?

Also note the green engine selectionbox, not sure how to hide that:
With Spring.SetUnitNoSelect you can not select the passenger to set waypoints before landing..
Post Reply

Return to “Help & Bugs”