View topic - factory that builds multiple units at once



All times are UTC + 1 hour


Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 27 Apr 2012, 05:37 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
Four times the flash spam \o/
Image

A factory that builds multiple clones of a unit at once.
I know some mods already have squad-building (S44) but with this you can see the units being concstructed.

Basically just define your buildspots like this:
Code:
local buildSpots = {
   [1] = piece "spawn1",
   [2] = piece "spawn2",
   [3] = piece "spawn3",
   [4] = piece "spawn4",
}
(can be more than 4)
and tada.

Idea is that the unit that is "originally" built by the factory is made invisible and then you do:
buildprogress_of_clones = buildprogress_of_original_unit
until done.
:shock: :shock: And then you kill the original and only the clones survive :shock: :shock:

blabla:
1) tooltip lets you find the invisible unit:
http://h9.abload.de/img/multifaggtori52brv.jpg
(solution: find some function to hide it better or hide it in hitsphere of factory. Spring.SetUnitNoDraw (bID, true) does not do it..)

2) nanoframes of units with too long buildtime decay (lol)
(solution: do not use nanoframe animation by changing:
local newUnit = Spring.CreateUnit (bdefID, x,y,z, i, teamID, false) (was true)

3) units do not inherit waypoints/states from factory
(shouldnt be hard to put in, left it out for now)

4) assisting does not work
(would require some gadget part to pass the guard-click to the invisible unit)

5) units do not follow movement/rotation of the buildpad pieces
5b) nanoframes can be bumped out of the factory
(solution: put in some movectrl or magnets)

Eventually one would want to add those things but then the script would have been longer.
So I thought before I tweak it for the actual unit, here is the "simple version" without much bling-bling:
http://code.google.com/p/springtutorialgame/source/browse/trunk/SpringTutorialGame.sdd/Scripts/factorymultipad.lua
There are even some comments!


Top
 Offline Profile  
 
PostPosted: 27 Apr 2012, 07:31 
Conflict Terra Developer
User avatar

Joined: 21 Jan 2010, 06:21
Location: Tucson
Very neat! I don't know if I have any use for this right now, but I'll keep an eye on it if it gets improved.


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 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.