Members | Sign In
All Forums > Mission Scripting
avatar

What happens when two enemies are spawned with the same name?

posted Sep 14, 2012 05:44:17 by lordrahvin
I am using the mission editor and have a condition/action line that spawns an enemy when the number of enemies on the screen is below a certain threshold and another condition is met. Based on this other condition, this determines where the ships are spawned.

The line currently reads:
Create enemy at point (817.0, 0.0, 17163.0) bearing 0 degrees with name "KA-04" and race/hull keys "Kralien enemy" "small" with fleet number 1.

But I'm worried. What if this condition is triggered while KA-04 is already flying around somewhere. What exactly will happen? Will there be two KA-04s? That will confuse COMMS. Will they both belong to Fleet 1? I don't mind if there are several KA-04s that get spawned, I'm just not sure it's a good idea to have them on the map at the same time.

Should I add a condition that none of the ships in fleet 1 already exist in order for the fleet to be spawned?
[Last edited Sep 14, 2012 05:45:31]
Daredevil Cosmic Cowboys, TNS Hyperion, Weapons Officer
1st Fleet of Southern California Sector.

page   1
2 replies
avatar
lordrahvin said Sep 14, 2012 06:41:02
If I send a text message from "KA-04" and KA-04 does not exist, does the text message still get sent?


Likewise, if I have something measuring the distance to KV-04, and KA-04 does not exist, will the distance be 0.0?


What's the default behavior of a newly generated unnamed enemy ship? Will it persue the Artemis? Will it attack Destroyers, Transports, or Space Stations? Will it do any kind of patrol or will it just keep flying in its original heading, or will it just sit there? Is there a good way to give it orders/priorities as it is generated?
[Last edited Sep 14, 2012 06:53:12]
Daredevil Cosmic Cowboys, TNS Hyperion, Weapons Officer
1st Fleet of Southern California Sector.

avatar
AaronMacke said Sep 14, 2012 16:30:33
Will there be two KA-04s?


Yep. And as far as I can tell you can control them both from a single command. So if you setup a stack for KA-04 to go to point 50000,0,50000, they will both head for the middle of the map.

Will they both belong to Fleet 1?


Yep.

If I send a text message from "KA-04" and KA-04 does not exist, does the text message still get sent?


Yes. The From: really doesn't matter, there does not have to be a corresponding object to any text messages that you send. You can have a "From" from 'The Easter Bunny' and it will still get sent. I make use of that lots in the Missions I am creating, that way you can get messages from "Fleet Command" or from other locations on the ship, like "Transporter Room" or "Stellar Cartography". I treat Comms more like Ops, I guess, they are take in messages from both on and off the ship, and it is their job to sum all the info up and get it to the Captain.

Likewise, if I have something measuring the distance to KV-04, and KA-04 does not exist, will the distance be 0.0?


Null, I think. But don't quote me on that. Any condition you have set that is using that distance would never be true as far as I can tell.

What's the default behavior of a newly generated unnamed enemy ship?


I am just talking a guess off of what I have seen so far, but it seems like they fly in a straight line unless something non-friendly to them gets in range. Then they open fire.
Login below to reply: