Morphed Cruiser Placement Gadget/Widget/whatever

Morphed Cruiser Placement Gadget/Widget/whatever

A fresh perspective on battle for control of Earth, brought to you by Sanada and Snoop.

Moderators: Moderators, Content Developer

Post Reply
User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Morphed Cruiser Placement Gadget/Widget/whatever

Post by SanadaUjiosan »

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
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Morphed Cruiser Placement Gadget/Widget/whatever

Post by Pxtl »

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.
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: Morphed Cruiser Placement Gadget/Widget/whatever

Post by SpliFF »

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.
User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Re: Morphed Cruiser Placement Gadget/Widget/whatever

Post by SanadaUjiosan »

If there's a more elegant solution, I'd gravitate towards that.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Morphed Cruiser Placement Gadget/Widget/whatever

Post by knorke »

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.
Post Reply

Return to “Conflict Terra”