This is the dedicated thread for this topic. What needs to happen:
- Morphing cruisers need an indicator to where exactly they'll be on the ground, and the direction they'll be facing.
Ideas:
- What I'm imagining to be best is something mirroring the Building system. A ghosted image of the cruiser, with it's footprint and the red/green grid showing what is viable ground and what's not. And very importantly, the ability to rotate the building with, for example, the bracket keys. After the command has been given, the cruiser goes to that point, rotates if necessary, and morphs.
Steps:
- Is it possible? (I know it is with lua!)
- Will someone help us achieve this?
SVN issue: http://code.google.com/p/conflictterra/ ... %20Summary
Morphed Cruiser Placement Gadget/Widget/whatever
Moderators: Moderators, Content Developer
- SanadaUjiosan
- Conflict Terra Developer
- Posts: 907
- Joined: 21 Jan 2010, 06:21
Re: Morphed Cruiser Placement Gadget/Widget/whatever
Well, the effect would probably be terrible, but couldn't you use the actual build command and destroy the cruiser after or during the construction? Iirc there's a self-build command, so perhaps you could, like, accelerate the "deployed" nanoframe to like 50% and then destroy the aircraft, and then let the deployed base self-build the rest of the way.
Re: Morphed Cruiser Placement Gadget/Widget/whatever
The trouble with destroying the unit is you'll break orders like guard/attack. You'll also trigger UnitDestroyed/UnitCreated callins which might have unanticipated effects.
- SanadaUjiosan
- Conflict Terra Developer
- Posts: 907
- Joined: 21 Jan 2010, 06:21
Re: Morphed Cruiser Placement Gadget/Widget/whatever
If there's a more elegant solution, I'd gravitate towards that.
Re: Morphed Cruiser Placement Gadget/Widget/whatever
it should be possible to check for build site with Spring.TestBuildOrder
http://springrts.com/wiki/Lua_SyncedRead#Test_Building
The tricky part is that on clicking the "land" button this has to happen:
1)cursor changes to a "buildsite style" landing zone marker thing
it shows with red/green grid if you can land or not
2) you can somehow rotate that "landing site"
3) cruisers flies there
4) cruisers lands
5) cruiser morphs into factory
3,4,5 are not that hard i think, it is just giving a move, land and morph command.
1+2 require some more work ie drawing the landing grid thing, react to press keyboard buttons etc.
lolzy workaround:
Each cruiser/factory consits of 3 units instead of 2:
cruiser
factory
landingsite
The landingsite is a buildoption of the cruiser. (It costs nothing and is build instantly.)
This saves the work of having to do 1+2 because the engine handles it.
So now you "just" have to check if the cruiser could sucessfully build the landingsite. If yes, you make the cruiser land (movecrtl or just set land/fly toggle to land) and trigger the morph process when the cruiser is on the ground.
Not doing it, just an idea how it might work with minimum effort.
http://springrts.com/wiki/Lua_SyncedRead#Test_Building
The tricky part is that on clicking the "land" button this has to happen:
1)cursor changes to a "buildsite style" landing zone marker thing
it shows with red/green grid if you can land or not
2) you can somehow rotate that "landing site"
3) cruisers flies there
4) cruisers lands
5) cruiser morphs into factory
3,4,5 are not that hard i think, it is just giving a move, land and morph command.
1+2 require some more work ie drawing the landing grid thing, react to press keyboard buttons etc.
lolzy workaround:
Each cruiser/factory consits of 3 units instead of 2:
cruiser
factory
landingsite
The landingsite is a buildoption of the cruiser. (It costs nothing and is build instantly.)
This saves the work of having to do 1+2 because the engine handles it.
So now you "just" have to check if the cruiser could sucessfully build the landingsite. If yes, you make the cruiser land (movecrtl or just set land/fly toggle to land) and trigger the morph process when the cruiser is on the ground.
Not doing it, just an idea how it might work with minimum effort.