Is it possible to make a ship that spawns ships every 30 seconds or so?
And if so please provide me with the code.
Question: concerning ships that spawn ships
yes, i'll put an example code up in a short while.
EDIT:
i have not tested this, at least yet, but putting this on a ship should make it create an autosentinel auton escorting it every 30 secons, the event that creates the ship is started when the ship is created, if the ship goes through a gate, or perhaps if the player does, it may stop working.
EDIT:
Code: Select all
<Events>
<makeship>
(block (auton)
; Create the auton
(setq auton
(sysCreateShip
&scAutoSentinel;
(objGetPos gSource)
&svFriendlyAuton;
"auton"
)
)
; Escort ship
(shpOrderEscort auton gSource)
; Welcome message
(objSendMessage gPlayerShip glossary "AutoSentinel® v2.01 online and escorting me")
)
<makeship>
<onCreate>
(sysAddObjRecurringTimerEvent 900 gSource "makeship")
</onCreate>
</Events>
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
just a note the OnAIUpdate is an item event. Only ships with that item (and that are AI) will run that event every 30 ticks. (iirc)
Crying is not a proper retort!
- Periculi
- Fleet Officer
- Posts: 1282
- Joined: Sat Oct 13, 2007 7:48 pm
- Location: Necroposting in a forum near you
Right, Betel!
Put it on a Carrier Bay and install it on a Carrier Ship and then be sure to give it some charges to track fighters and maybe some code in the event to only launch if the playership is in range...
Put it on a Carrier Bay and install it on a Carrier Ship and then be sure to give it some charges to track fighters and maybe some code in the event to only launch if the playership is in range...
- Arisaya
- Fleet Admiral
- Posts: 5535
- Joined: Tue Feb 05, 2008 1:10 am
- Location: At the VSS Shipyards in the frontier, designing new ships.
or any target... shouldn't be too hard...Periculi wrote:Right, Betel!
Put it on a Carrier Bay and install it on a Carrier Ship and then be sure to give it some charges to track fighters and maybe some code in the event to only launch if the playership is in range...

(shpOrder gPlayership 'barrelRoll)
<New tutorials, modding resources, and official extension stuff coming to this space soon!>
<New tutorials, modding resources, and official extension stuff coming to this space soon!>