Is it possible to have a wrecked ship explode when a playership docks with it, before the dockscreen? Just curious. I wanted to add a nasty suprise to looting. It would have to be a percentage chance to happen, maybe a base percent adj by ship size/class. And can I make it bypass the ships shields? I figure, if your docked with it, some portion of the ship hads to breach your shields. That portion would not encounter shielding, just armor. Just curious?
Thanx!!!
How to? - Make a Wreck explode during docking
It would certainly be possible.
I pulled this out of the events tag on the arena.
(eq aObjDocked gPlayerShip) should tell you if it's the player that docked, you can then run your custom event to explode the wreck or whatever else you want to do, like contaminate the player's ship, emp it, etc.
(scrExitDock gScreen) can be used to kick the player out of the dockscreen before he/she can do anything.
There's a new function (objDamage) which I believe skips shields, see the pteravores for an example of its use.
I pulled this out of the events tag on the arena.
Code: Select all
<OnObjDocked>
(if (and (eq aDockTarget gSource) (not (eq aObjDocked gPlayerShip)))
(block (arenaRank)
(setq arenaRank (objGetGlobalData gSource "arenaRank"))
(switch
(eq arenaRank 'gladiator)
(block Nil
(objMoveTo aObjDocked gSource)
(shpCancelOrders aObjDocked)
(objSuspend aObjDocked)
)
(block Nil
(objMoveTo aObjDocked (sysVectorPolarOffset gSource 270 300))
(objUnregisterForEvents gSource aObjDocked)
(shpCancelOrders aObjDocked)
(shpOrderGate aObjDocked)
)
)
)
)
</OnObjDocked>
(eq aObjDocked gPlayerShip) should tell you if it's the player that docked, you can then run your custom event to explode the wreck or whatever else you want to do, like contaminate the player's ship, emp it, etc.
(scrExitDock gScreen) can be used to kick the player out of the dockscreen before he/she can do anything.
There's a new function (objDamage) which I believe skips shields, see the pteravores for an example of its use.
Well, if it's possible to make wrecks explode on undocking (which, given it happens in RC3 with the annoying NPC looters, IS)...then it should be possible to make them explode ON docking.
Just be careful it doesn't happen with really important things....
(Iocrym Command Ship wreck explodes with Thermoexplosion4, killing you before you can get the control rod=
)
Just be careful it doesn't happen with really important things....
(Iocrym Command Ship wreck explodes with Thermoexplosion4, killing you before you can get the control rod=

Mischievous local moderator. She/Her pronouns.
- Arisaya
- Fleet Admiral
- Posts: 5535
- Joined: Tue Feb 05, 2008 1:10 am
- Location: At the VSS Shipyards in the frontier, designing new ships.
how do you control the explosion level of the wreck explosion?
(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!>