Jump to content
Sign in to follow this  
electriceel

Problem with spawning units

Recommended Posts

I have this idea of making an aircraft carrier units that is capable of spawning kamikaze bombers. At the moment, it works, but refuses to regenerate the lost units, i.e. it fires off one salvo of the kamikaze bombers, then refuses to reload. Below is the relevant code:

 

[sUICAR]

...

Primary=KamiLauncher

LandTargeting=0

DefaultToGuardArea=yes

CanPassiveAquire=no

Spawns=KAMI

SpawnsNumber=1

SpawnRegenRate=20

SpawnReloadRate=0

FireAngle=32

ToProtect=yes

...

[KamiLauncher]

;identical to the original HornetLauncher, but with a different range

 

[KAMI]

;identical to the ASW (I also tried cloning it from the Hornet, but that didn't go down well), except:

Image=HORNET

Primary=Maverick10

DeathWeapon=CRNuke

 

[Maverick10]

...

Projectile=Kamikaze ;GEF was AAHeatSeeker2 ; was HeatSeeker

...

RadLevel=800

Warhead=CRNUKEBOMBWH

Report=NukeExplosion

LimboLaunch=yes

 

[Kamikaze]

Image=HORNET

SubjectToElevation=yes

 

Any idea how I can make so regenerate the spawned units normally?

Edited by electriceel

Share this post


Link to post

Pretty sure it's your SpawnReloadRate. That's a special case for aircraft with MissileSpawn=yes. Try setting MissileSpawn=yes on your Kamikaze Fighter. Failing that, set SpawnReloadRate to something greater than zero.

Share this post


Link to post

Hmm, I've tried your suggestions and it still doesn't work; not with MissileSpawn=yes, or with a nonzero SpawnReloadRate (the reason that it was zero in the above post in the first place was because I tried a nonzero value first and then found it didn't work, so resorted to zero for the SpawnReloadRate, which still doesn't work) :(

 

On a different note, is there any way of making squads of infantry come out of barracks? I'm thinking Generals Red Guard-style or Tiberium Wars style, so that less clicking is required. :D

 

One more thing; I've got a new animation I want to add to the mod, but how do I go about doing this? I can't remember where weapons animations are stored.

Edited by electriceel

Share this post


Link to post
Hmm, I've tried your suggestions and it still doesn't work; not with MissileSpawn=yes, or with a nonzero SpawnReloadRate (the reason that it was zero in the above post in the first place was because I tried a nonzero value first and then found it didn't work, so resorted to zero for the SpawnReloadRate, which still doesn't work) :(

Strange. Have you tested your new unit with a normal spawned plane to test whether its that causing an issue?

 

On a different note, is there any way of making squads of infantry come out of barracks? I'm thinking Generals Red Guard-style or Tiberium Wars style, so that less clicking is required. :D

Not possible.

 

One more thing; I've got a new animation I want to add to the mod, but how do I go about doing this? I can't remember where weapons animations are stored.

All new art is referenced in art(md).ini.

Share this post


Link to post
On a different note, is there any way of making squads of infantry come out of barracks? I'm thinking Generals Red Guard-style or Tiberium Wars style, so that less clicking is required. :D

Not possible.

Suppose you made an infantry unit that looked like three units and only occupied one cell just like as if you placed three units on the same cell?

 

Can you not disable multiple infantry single-cell occupation and add three bursts to your unit's weapon?

 

The infantry sprite may be a pain to make, but could this simulate a squad? Since it's fake anyway, I expect you could make a squad of five rather than three too...

Share this post


Link to post

Probably, but I've thought squads were a lousy idea ever since they did it in Generals. I just try coming up with unconventional ideas to make things work when they shouldn't, after all, that's how I made it as a modder this long before finally needing Ares.

Share this post


Link to post
Strange. Have you tested your new unit with a normal spawned plane to test whether its that causing an issue?

Well, with a normal spawned plane it works completely fine - since I cloned the coding from the original aircraft carrier, it just worked like a normal carrier. Could it possibly have anything to do with the LimboLaunch tag?

Share this post


Link to post

If LimboLaunch doesn't count the unit as being erased, then I would surmise yes. In effect, the unit's really not dying, which is why the Carrier wouldn't reload them.

 

Test without LimboLaunch and see what happens.

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.

×