public void TurretShapeDataMountPlayer(coTurretShapeData thisobj, coTurretShape turret, coShapeBase player) { if (turret.isObject() && turret.getDamageState() != "Destroyed") { turret.call("setMountTurret", player); } }
public void TurretShapeDataOnDestroy(coTurretShapeData thisobj, coTurretShape obj, string laststate) { // This method is invoked by the ShapeBase code whenever the // object's damage state changes. // Fade out the destroyed object. Then schedule a return. int destroydelay = iGlobal["$TurretShape::DestroyedFadeDelay"]; obj.startFade(1000, destroydelay, true); obj.schedule((destroydelay + 1000).AsString(), "delete"); if (obj.call("doRespawn") != "") { ((coSimSet)"MissionGroup").schedule(sGlobal["$TurretShape::RespawnTime"], "respawnTurret", thisobj, console.GetClassName(obj), obj.getTransform().AsString(), true.AsString(), true.AsString()); } }