Hey there,
I am currently having problems coding a deploying unit. I want it to be deployed upon command (and click) and undeployed by the same way.
I am using the Combat Bike Logic at the moment, but I can't get around the problem that the switching of the fake riders would not work correctly.
The funny thing is, the Locomotor can be changed as often as I want, but the weapon won't change when the rider changes. So it's not flawless at the moment.
Does anyone know how to perfectly code a deploying (or even just Locomotor changing) unit? I'd really appreciate any help to get past those Locomotor upgrade restrictions given by the normal upgrade.
Thanks in advance, yours HEXman
P.S.: Some code...
This shows the weaponsets changed by the different riders:
Code:
WeaponSet
Conditions = WEAPON_RIDER1
Weapon = PRIMARY NONE
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
End
WeaponSet
Conditions = WEAPON_RIDER2
Weapon = PRIMARY CWCruRT21Weapon
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
End
This is the locomotor changing:
Code:
Locomotor = SET_NORMAL CWCruRT21NormalLocomotor
Locomotor = SET_SLUGGISH None
The RiderChangeContain part:
Code:
Behavior = RiderChangeContain ModuleTag_16
;A list of each valid rider that is allowed to ride this object. Each rider is
;assigned a modelcondition state, a weaponset flag, an object status bit, and
;a commandset override. The actual object is hidden inside the container so the
;visible rider is fluff. Also riders are deleted (not killed) when the bike is
;destroyed, so all deaths must be OCLs on the bike.
Rider1 = CWCruRT21NormalPilot RIDER1 WEAPON_RIDER1 STATUS_RIDER1 CWCruRT21NormalCommandSet SET_NORMAL
Rider2 = CWCruRT21DeployedPilot RIDER2 WEAPON_RIDER2 STATUS_RIDER2 CWCruRT21DeployedCommandSet SET_SLUGGISH
ScuttleDelay = 1500
ScuttleStatus = TOPPLED
;Standard TransportContain stuff
Slots = 1
InitialPayload = CWCruRT21NormalPilot 1
ScatterNearbyOnExit = No
HealthRegen%PerSec = 0
DamagePercentToUnits = 100% ; This module will Delete the rider on death, but we need to kill him as well so he doesn't pick up the bike's salvage crate.
BurnedDeathToUnits = No ; And no Burned death.
AllowInsideKindOf = INFANTRY
ExitDelay = 250
NumberOfExitPaths = 1 ; Defaults to 1. Set 0 to not use ExitStart/ExitEnd, set higher than 1 to use ExitStart01-nn/ExitEnd01-nn
GoAggressiveOnExit = Yes ; AI Will tell people to set their mood to Aggressive on exiting
DoorOpenTime = 0
End
All that is changed by a specialpower and OCL's using fake riders.