Other great resources: Official JS API docs, Scripting Forum
DROID_SUPERTRANSPORTER
- Aubergine
Scripting Transports
Prior to Warzone 3.1 Beta 5, there was only a DROID_TRANSPORTER constant and it was used for both cyborg transports and super transports, making it almost impossible to use transports in scripts. As such, it's recommended that you avoid using transports of any kind in Warzone 3.1 Beta 4 and earlier.
Building them
The following prerequisites are required before you can build a super transporter:
- You must have researched
"R-SuperTransport"
and its prerequisites using pursueResearch() - They should only be built in a VTOL_FACTORY that has 3 modules (because that's a requirement for human players)
Once the prerequisites are achieved, order a VTOL factory to build a transport using the following components:
Propulsion | anyone know what propulsion to use? |
---|---|
Body | "SuperTransportBody" |
Turret 1 | anyone know what turret to use? |
Turret 2 | |
Turret 3 | |
droidType | DROID_SUPERTRANSPORTER |
Then listen for eventDroidBuilt() to be notified when production is complete.
Moving them
The transport can be moved around the map using the orderDroidLoc() function, with a command of DORDER_MOVE or DORDER_SCOUT.
Super Transport designed by Jorzi
Listen to eventDroidIdle() to be notified when the transport reaches its destination (lands).
Embarking and Disembarking units
A transport must have landed before you can move droids on and off it, then you can use orderDroidObj() with:
- DORDER_EMBARK to move a droid on to the transport
- DORDER_DISEMBARK to make a droid leave the transport
It's not yet clear how to determine when a droid has entered or left the transport cargo hold, although it's likely eventDroidIdle() will be triggered.
When a droid enters a transport, it is move "off map" – that means certain functions such as enumDroid() and hackGetObj() won't see the droid any more.
Cargo capacity
The campaign super transport can carry 10 units of any size. The skirmish equivalent, sometimes referred to as a "tank transport", also has 10 slots but medium body tanks occupy 2 slots each, and large body tanks occupy 3 slots each. (Thanks to NoQ for info)
In Warzone 3.1, it's not possible to determine the body size of droids which makes it difficult to keep track of how much cargo space is used.
There is currently no way to get an inventory of cargo on a transport so you'll need to maintain your own lists of what's in the cargo.
Repairing & Recycling
Unlike other VTOLs, transports don't need re-arming, as such it's generally best to move them to a repair facility using DORDER_RTR or DORDER_RTR_SPECIFIED.
Transports can be recycled using DORDER_RECYCLE.
What happens if they get destroyed?
When a transport is destroyed, all units on the transport will also be destroyed.
Campaign features
There are also a few transport-related campaign features in the JS API:
- setReinforcementTime() – used to display a countdown timer showing when a transport will arrive with reinforcements...
- eventReinforcementsArrived() – ...triggered when that timer reaches 0
Availability 3.1 B5+
Requires:
- Warzone 3.1 Beta 5.
Contents
Jump to:
See also
Related articles:
- DORDER_DISEMBARK – tell a droid to disembark (move out of) a transporter
- DORDER_EMBARK – tell a droid to embark (move on to) a transporter
- DROID_TRANSPORTER – a Cyborg transport, only capable of carrying cyborg droids
- orderDroidLoc() – move the transport to a new location on the map
- orderDroidObj() – order droids to embark or disembark a transporter
Forum discussions:
- API update proposal
- Transport slots based on weight
- Size-based cargo limits
- Super Transport artwork
- Jorzi's Super Transport (the one used in the game)
Add-ons using transports:
- Ultimate Scavenger Mod – uses transporters to create custom helicopter units for the Scavenger Faction faction.