View topic - Morphed Cruiser Placement Gadget/Widget/whatever



All times are UTC + 1 hour


Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 08 Feb 2011, 01:52 
Conflict Terra Developer
User avatar

Joined: 21 Jan 2010, 06:21
Location: Tucson
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


Top
 Offline Profile  
 
PostPosted: 08 Feb 2011, 02:13 
User avatar

Joined: 23 Oct 2004, 00:43
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.


Top
 Offline Profile  
 
PostPosted: 08 Feb 2011, 02:17 
User avatar

Joined: 28 Jul 2008, 05:51
Location: Australia
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.


Top
 Offline Profile  
 
PostPosted: 08 Feb 2011, 02:26 
Conflict Terra Developer
User avatar

Joined: 21 Jan 2010, 06:21
Location: Tucson
If there's a more elegant solution, I'd gravitate towards that.


Top
 Offline Profile  
 
PostPosted: 10 Feb 2011, 20:32 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
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.


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.