Jump to content
Sign in to follow this  
blood1995

Making a Building spawns units around with time

Recommended Posts

Hellow dear community, I'm glad to see that there are still some active people coding on CnC3.

In my side I'm actually working on project for Kane's Wrath, using Wrath Ed 1.07 Gamma.

I've started since a week, so my knowledge in coding is a bit low.

 

So I would like to know how could I make the GDIConstructionYard able to spawns random units around him with a certain radius and delay. I've checked a lot of .xml files and the only function that I found was SpawnBehavior but it will spawn the unit inside the structure which will make it unable to move.

 

Thanks for the help.

Share this post


Link to post

Make sure that spawninsideofbuilding is set to false

SpawnInsideBuilding="false"

you can also try to add a

 

<QueueProductionExitUpdate
                id="ModuleTag_QueueProduction"
                ExitDelay="1">
                <UnitCreatePoint
                    x="0.0"
                    y="17.0"
                    z="0.0" />
                <NaturalRallyPoint
                    x="90.0"
                    y="17.0"
                    z="0.0" />
            </QueueProductionExitUpdate>
 

Basicly look at how the harvesters are spawned in the refineries.

 

try that.

  • Upvote 1

Share this post


Link to post

It worked fine, thanks you very much.

I would like to know if it's possible to put a randomvalue on the x and y value that will change for each spawned unit.

Share this post


Link to post

Not really. There are probably other ways(bit more complicated) to get the desired effect, through lua and the objectcreationlist. You might be able to use the disposition atribute for that

 

Disposition="SPAWN_AROUND"

something like that maybe.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×