I have a following setup flying around in something i play around with occasionally:
1) A donut-shaped gunship builder
2) A little gadget that does set-unit-piece-collision-data so that the collision volumes when viewed in alt-v are just as donut-shaped as the unit.
3) An invisible, invincible, zero-radius, zero-height, zero-everything factory unit with blocking=0, collision=false, everything possible collision-related set to false and a yardmap of a single letter "o"
4) a unitscript for said flying donut that keeps the factory attached to the donut.
What this results in: on first attempt of motion, donut is launched into space by some hideus force. Then it falls back from the sky, and starts jittering around. This jitter also seems to grant it superpowers, so it can fly across the map in half a second when given the order (without order, jiter is brownian and fairly constrained)
What do i do? My aim is a flying factory/builder unit that can shoot stuff, and the factory products should fall freely from within the donut.
Any way to completely disable collisions on the factory sub-unit would be perfect, of course.
(bonus level: how do i make the factory sub-unit non-selectable?)
Completely disable collision checking on unit?
Moderator: Moderators
Re: Completely disable collision checking on unit?
Bonus answer: Spring.SetUnitNoSelect(unitID, true)
Re: Completely disable collision checking on unit?
Did you see http://springrts.com/phpbb/viewtopic.ph ... 03&start=0 ?
I gave that script to a flying unit and it worked. (no bouncing)
factoryID = Spring.CreateUnit ("NAME_OF_FACTORY", x,y,z+100, 0, teamID)
Had to make the +100 a bit larger though, otherwise the factory would not build. (maybe the aircraft I used was bigger than the groundunit so it blocked or w/e)
Another problem with such flying factories was that the factory refuses to start construction when something is under the factory:

(The vehicles "block" the factory)
The factory might be flying but appearently it still cares whether the constructed unit will have a free place on the ground.
Did you figure out something for that? (beside lua new factory-building code)
Similiar to sea factory in BA:
If a submarine is in the factory, the factory refuses to start construction of a ship because the submarine "blocks" the ship.
(which is nonsense because the ship can drive over the submarine, so it should not block the factory)
http://springrts.com/phpbb/viewtopic.php?f=21&t=28205
The bouncing might be because the aircraft collides with the factory, though I could not reproduce it. (think they will still collide even with zero radius, maybe try SetUnitBlocking)
I gave that script to a flying unit and it worked. (no bouncing)
factoryID = Spring.CreateUnit ("NAME_OF_FACTORY", x,y,z+100, 0, teamID)
Had to make the +100 a bit larger though, otherwise the factory would not build. (maybe the aircraft I used was bigger than the groundunit so it blocked or w/e)
Another problem with such flying factories was that the factory refuses to start construction when something is under the factory:

(The vehicles "block" the factory)
The factory might be flying but appearently it still cares whether the constructed unit will have a free place on the ground.
Did you figure out something for that? (beside lua new factory-building code)
Similiar to sea factory in BA:
If a submarine is in the factory, the factory refuses to start construction of a ship because the submarine "blocks" the ship.
(which is nonsense because the ship can drive over the submarine, so it should not block the factory)
http://springrts.com/phpbb/viewtopic.php?f=21&t=28205
The bouncing might be because the aircraft collides with the factory, though I could not reproduce it. (think they will still collide even with zero radius, maybe try SetUnitBlocking)
Re: Completely disable collision checking on unit?
I''ve resorted to this to prevent it from jumping, but it still does if i put factory inside. Though in my case it does start building (which causes even whackier jitter).factoryID = Spring.CreateUnit ("NAME_OF_FACTORY", x,y,z+100, 0, teamID)
Didn't even stumble into this yet.Did you figure out something for that? (beside lua new factory-building code)
Oh, and i also tried the transport/fireplatform approach, and found out that my master unit refused to build buildings when turned into a transport. Are transports forbidden from being cons? 0_0
(i remember though that there was some crazy bug report that factories being loaded into transports caused crash. but i couldn't get mah unit to load the fac, probably because stupid)
Re: Completely disable collision checking on unit?
Yes.Anarchid wrote:Are transports forbidden from being cons? 0_0