Removing virtual objects when new playership created

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
Aeonic
Militia Commander
Militia Commander
Posts: 469
Joined: Sun Jun 14, 2009 1:05 am
Location: Designing his dream ship.

I'm wondering if this is doable. Since when you equip a ship with a weapon in the ship's XML you are able to specify the location where the weapon originates, I'm wondering if it might be possible to create virtual weapons for all of the ship's device slots, assign locations to those weapons, and then remove those weapons when the ship is created? That would theoretically allow you to create a position on the ship for each of the ship's device slots.

I just don't know if there's any functions called when the new ship is created. I'm also not sure how to remove the weapons, but that's a minor detail. :P

Also, where can I find a list of all the functions associated with each object? I'm not talking about things that you can do TO the object, I'm talking about things that are called FROM the object, such as <Invoke>.
Last Cause Of Death: Destroyed by Karl Svalbard's last Lucifer missile, right after I blew him up. And the crowd cheers.
Image
User avatar
Vizth
Commonwealth Pilot
Commonwealth Pilot
Posts: 54
Joined: Mon Sep 04, 2006 12:56 am
Location: Tellico Plains, Tennessee

Like slots for right and left side turrets? might be a cool idea.
Image
User avatar
Prophet
Militia Captain
Militia Captain
Posts: 826
Joined: Tue Nov 18, 2008 6:09 pm

I believe <OnInstall> is called at creation for any beginning weapons, that would probably be your best bet. However, I don't know how you would go about installing a new weapon into that 'device slot' and whether it would maintain the original weapon's specs or not. (like position, fire angle etc.)

You can find most of the item events on the wiki.

IRC is always a great place to ask questions too!
Coming soon: The Syrtian War adventure mod!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

You could do a nonvirtual item that never appears randomly and deletes itself in an onupdate event. They'd show up in the ship selection screen, but that's a feature not a bug. Name them "port turret" "starboard turrat" "bow turret" or just a single item named "turret slot"
Post Reply