Vehicle that stops working but never dies..

For info on the site, community and 'battlefieldy' things

Vehicle that stops working but never dies..

Postby fo0k » Tue Jul 20, 2010 12:04 am

I am making a ctf map and would like vehicles that when attacked will stop moving / become immobilised when they would usually die/explode.. forcing the passengers to get out and defend themselves on foot. at this point the vehicle could be used as cover which would be cool. (It would still die fully if no players are near the vehicle for x time limit...
If they are able to overcome the enemy I would like them to be able to return to the vehicle and fix it with a wrench.... im imagining that when the vehicle becomes immobilised it cannot be fixed for say 30 seconds.. so the soldiers have to fight.. they cant just try and repair straight away.

Any kinda ballpark ideas to achieve this?
User avatar
fo0k
 
Posts: 1411
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Postby freddy » Tue Jul 20, 2010 11:13 am

well there is
Code: Select all
ObjectTemplate.stayAsDestroyed 1

and
Code: Select all
ObjectTemplate.CanBeRepaiedAsDestroyed c_True

the last one i haven´t had much success with (havent tried very hard tho)

for the 30 sec time limit only thing i could think of would be like
Code: Select all
ObjectTemplate.Active vehicle
ObjectTemplate.addArmorEffect 1 Spawner something with a negative supply bubble that last for 30 sec using the timetolive code 0/0/0
User avatar
freddy
 
Posts: 1221
Joined: Sun Oct 18, 2009 4:58 pm

Re: Vehicle that stops working but never dies..

Postby fo0k » Tue Jul 20, 2010 1:27 pm

wow.. never thought for a moment that there was existing code for this :P

is it currently used in any vanilla map? I dont recall seeing this before.

also is 'Repaied' a typo from you or the devs? is this why you have not had success :) heheh
User avatar
fo0k
 
Posts: 1411
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Vehicle that stops working but never dies..

Postby fo0k » Tue Jul 20, 2010 2:19 pm

Yeah I dont quite get this either.. anyone made this work?
User avatar
fo0k
 
Posts: 1411
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Postby freddy » Tue Jul 20, 2010 3:54 pm

i found it in the Hiryu objects code but under ShokakuAABattery, little weird but there it is :)

Code: Select all
rem *** Enterprise_AABattery1 ***
ObjectTemplate.create PlayerControlObject ShokakuAABattery1
ObjectTemplate.aiTemplate ShokakuAA2
ObjectTemplate.setNetworkableInfo ShokakuBodyInfo
rem -------------------------------------
ObjectTemplate.addTemplate Carrier_AA_Base
ObjectTemplate.setPosition 0/0.5/0
rem -------------------------------------
ObjectTemplate.CanBeRepaiedAsDestroyed c_True


just checked and the Shokaku has the same

edit: couldnt find that code in the exe, this was the closest
Code: Select all
canBeRepairedAndDestroyed
User avatar
freddy
 
Posts: 1221
Joined: Sun Oct 18, 2009 4:58 pm

Postby freddy » Tue Jul 20, 2010 4:28 pm

i could think of other ways to accomplish something like what you want but that would not look that nifty

edit: found another line in the exe
Code: Select all
objectTemplate.isNotSaveable

perhaps this has to be activated first and set to 0
User avatar
freddy
 
Posts: 1221
Joined: Sun Oct 18, 2009 4:58 pm

Re: Vehicle that stops working but never dies..

Postby fo0k » Tue Jul 20, 2010 6:52 pm

doing a quick google on that i found this http://www.realitymod.com/forum/f189-mo ... ation.html

scroll to the first chunk of code... maybe to do with control points?
User avatar
fo0k
 
Posts: 1411
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Postby freddy » Tue Jul 20, 2010 7:02 pm

jep, can be. i have a list someone extracted from the exe so its much gussing and testing involved when one find some funny code in there. pays off maybe once on ten but its fun experimenting :)

edit: just an example of "set" commands
Code: Select all
set1pAnimationSpeed
set3pAnimationSpeed
setAIEnterOnSpawn
setAISystemComponentsQuotient
setActivater
setActiveAcceleration
setActiveCombatArea
setActiveCondition
setActiveLayer
setActiveLayerId
setActiveObject
setActiveObjectTemplate
setActivePrerequisite
setActiveState
setActiveStrategy
setActiveTemplate
setAirKeyboardSensitivity
setAirMouseInvert
setAirMouseSensitivity
setAlliedCampaign
setAlliedDebriefingMajorDefeat
setAlliedDebriefingMajorVictory
setAlliedDebriefingMinorDefeat
setAlliedDebriefingMinorVictory
setAlliedHints
setAlliedObjectives
setAlliedSkirmish
setAlternativePath
setAlwaysTargetSoldier
setAmbient
setAnimatedTextureSpeed
setAnimationGroup
setAnimationInfo
setAnimationState
setAreaObjectiveRelation
setAreaValue
setAttacks
setAxisCampaign
setAxisDebriefingMajorDefeat
setAxisDebriefingMajorVictory
setAxisDebriefingMinorDefeat
setAxisDebriefingMinorVictory
setAxisFixation
setAxisHints
setAxisObjectives
setAxisScale
setAxisSkirmish
setBackgroundMusic
setBasePriority
setBasicBotWeights
setBasicLODDistance
setBasicTemperature
setBattleStrength
setBeforeSpawnCameraPosition
setBehaviour
setBehaviourModifier
setBoneOriginOffset
setBotSkill
setBrushLevel
setBrushStrength
setBulletsFired
setBulletsGivingDamage
setBumpTexture
setButtonFallTime
setButtonRiseTime
setCameraBlink
setCameraHeight
setCameraPosition
setCameraRelativeMaxRotationDeg
setCameraRelativeMinRotationDeg
setCameraShakeFadeIn
setCameraShakeFadeOut
setCameraShakeInOut
setCameraShakeLeftRight
setCameraShakeMinFactor
setCameraShakePitch
setCameraShakeRoll
setCameraShakeTimeToShake
setCameraShakeUpDown
setCameraShakeYaw
setCampaignAiSkill
setCampaignBotRatio
setCampaignDifficulty
setCampaignLoseMusicFilename
setCampaignNrOfLives
setCampaignPercentageOfBots
setCampaignPercentageOfCpu
setCampaignScores
setCaptures
setChannels
setCharacterHeight
setChatHistory
setCheckBoneDistance
setChineseYTextOffset
setCloudFog
setCommonMouseSensitivity
setConditionStrength
setConnection
setCoronaColor
setCoronaColor2
setCoronaCount
setCoronaFadeAngleFactor
setCoronaRot
setCoronaSize
setCoronaSize2
setCoronaTexture
setCrossHairColor
setCrossHairType
setCrouchingAnims
setCrouchingFallbackAnimOverride
setCurrentLevel
setCurrentNumberOfTickets
setCustomGameFilter
setDebriefingMusicFilename
setDebugFreeCameraEnter
setDecisionMakingInterleave
setDedicatedOnlyFilter
setDefaultAnims
setDefaultFallbackAnimOverride
setDefaultIp
setDefaultShaderSolidColor
setDefences
setDefender
setDetailTexture
setDisableSound
setDragModifier
setDstBlend
setEditMode
setEffectTemplate
setEffectsQuality
setEnterOnSpawn
setEntryRadius
setEnvironmentMapping
setExplodePartAtDestroy
setFireCameraShakeAnimationState
setFireDev
setFirstPerson
setFirstPlace
setFixToGround
setFlagLocation
setFlapLift
setFlareColor
setFlareColor2
setFlareFadeAngleFactor
setFlareRot
setFlareSize
setFlareSize2
setFlareTexture
setFloatMaxLift
setFloatMinLift
setFloatParam
setForceCameraToGround
setForceNetworkableId
setForwardSpeed
setGameDisplayMode
setGameTypeFilter
setGoBackOnRecoil
setGodMode
setGraphicsQuality
setHardware
setHasExposedSoldier
setHasRecoilForce
setHasTarget
setHearingProbability
setHeatBarType
setHudAmmoType
setHullHeight
setIgnoreRadioAudioAndText
setInAirAnims
setInAirFallbackAnimOverride
setInfMouseInvert
setInfMouseSensitivity
setInformationGridDimension
setIntegerParam
setIntroMoviePath
setInvertAxis
setIsAbortCondition
setIsAntiAircraft
setIsDisabledRecursive
setIsFirstPersonPart
setIsInTweakModeRecursive
setIsSaveableRecursive
setIsUnique
setIsVisibleRecursive
setJapaneseYTextOffset
setKitActiveName
setKitIcon
setKitName
setKoreanYTextOffset
setLandSeaKeyboardSensitivity
setLandSeaMouseInvert
setLandSeaMouseSensitivity
setLensFlareCount
setLiePointUpDownAngle
setLightmaps
setLoadMusicFilename
setLoadPicture
setLocalLevelCost
setLocalized
setLocalizedDialog
setLodDistance
setLodLevelPriority
setLodLevelTicks
setLodRange
setLodValue
setLoseMusicFilename
setLyingAnims
setLyingFallbackAnimOverride
setMajorVictory
setMapFilter
setMapSpawnPoints
setMasterVolume
setMaterialSkidMarkExtraWidth
setMaterialTrigLevels
setMaxNBots
setMaxNameTagDistance
setMenuMusicFilename
setMenuMusicVolume
setMenuViewdistance
setMinNrOfPlayers
setMinSpawnHeight
setMinimapIcon
setMinimapIconSize
setMinimapTransparency
setMinorVictory
setMiscDev
setMissionNr
setMorphFactor
setMouseSensitivity
setMouseSensitivityFast
setMouseSensitivitySlow
setMultiplayerBriefingMapType
setMultiplayerBriefingObjectives
setMusicOnOff
setNBehaviours
setNVehiclesTypes
setNameTagDistance
setNextLevel
setNonPasswordOnlyFilter
setNrOfRounds
setNumberOfTicketPerPlayer
setNumberOfTickets
setObjectTemplate
setObjectToGround
setObjectTypeFlags
setObjectiveAlliedDefeat
setObjectiveAlliedVictory
setObjectiveAxisDefeat
setObjectiveAxisVictory
setObjectiveBriefing
setObjectiveCompletetionString1
setOcclusionQuadWidthHeight
setOrderPosition
setOtherState
setParachuteDrag
setParachuteSpeed
setPassiveAcceleration
setPerformance
setPingFilter
setPitchOffset
setPlannedDecisionMakingThreshold
setPlayerBlink
setPlayerHitFlashTime
setPlayerName
setPlayersFilter
setPointUpDownAngle
setPoseCameraPos
setPosition
setPositionAxisDUR
setPositionOffset
setPositionalFixation
setPredictionMode
setPrerequisite
setPrerequisiteWeight
setPrimaryAmmoBar
setProfile
setQuality
setRadioFlashTime
setRadioTimeoutTime
setRadioToolTip
setRadioToolTipColor
setRandMaxColor
setRandMaxScale
setRandMaxTilt
setRandMinColor
setRandMinScale
setRandomGeometries
setRecoilForceLeftRight
setRecoilForceUp
setRegulateToLift
setRemoteConsoleCurrentLine
setRenderWhenSpawnMenu
setRentAServerUrl
setRespawnAllowed
setRootObjectSpawner
setRotAngle
setRotatingAxisYPR
setRotation
setSAIUpdateFrequency
setSavedSkirmishMap
setSearchMapMaxSlope
setSecondPlace
setSecondaryAmmoBar
setSensingQuotient
setServerFilter
setServerInfoIcon
setServerWelcomeMessage
setShadows
setSkeletonCollisionBone
setSkin not used on geometrytemplate
setSkirmishAiSkill
setSkirmishBotRatio
setSkirmishDifficulty
setSkirmishNrOfLives
setSkirmishPercentageOfBots
setSkirmishPercentageOfCpu
setSkirmishTeam
setSkyTextures
setSmoothing
setSmoothingLevel
setSnapToGrid
setSoldierExitLocation
setSonarRotationSpeed
setSoundDetail
setSoundSphereRadius
setSoundTrigger
setSpawnAsParaTroper
setSpawnDelay
setSpawnId
setSpawnPositionOffset
setSpawnPreventionDelay
setSpawnRotation
setSpeedDev
setSrcBlend
setStandardMoralAdmin
setStandardPersonality
setStartOnEffects
setStaticMinimap
setStatsGatheringEnabled
setStatsViewDistance
setStopOnEffects
setStrType
setStrafeSpeed
setStrafing
setStrategicObjectsModifier
setStrategicStrength
setStrength
setSunLightDirection
setSystemQuotient
setTakeable
setTeamGeometry
setTeamRatio
setTeamSkin
setTemplateLevel
setTexScale
setTexture
setTextureParam
setThirdPlace
setTicketLostPerMin
setTicketRatio
setToolActive
setToolSensitivity
setToolTip
setToolTipType
setTopLeftCorner
setTotAttacks
setTotBulletsFired
setTotBulletsGivingDamage
setTotCaptures
setTotDeaths
setTotDefences
setTotKills
setTotScore
setTotVehicleDestroyed
setTracerTemplate
setTreeModifier
setTreeModifierCombatStrength
setTrigger
setTurnDev
setTurnLeftRightAngle
setUnplannedDecisionMakingThreshold
setUseActiveCombatArea
setUseNoPathfindingToGetToObject
setUseRandomStartTime
setVSyncEnabled
setVectorParam
setVehicle
setVehicleBehaviour
setVehicleCategory
setVehicleDefaultBehaviour
setVehicleDestroyed
setVehicleType
setVehicleWithInputId
setVictoryType
setViewDistance
setWalkSpeedFactor
setWaterCutOffDepth
setWaterDepth
setWaterHeight
setWinMusicFilename
setWingLift
setWingToRegulatorRatio
setWorldMapSize
User avatar
freddy
 
Posts: 1221
Joined: Sun Oct 18, 2009 4:58 pm

Re: Vehicle that stops working but never dies..

Postby Senshi » Tue Jul 20, 2010 9:41 pm

Hm, difficult one.

One possibility: Use the circumstance that critically damaged PCOs are heavily restricted in their movement. Give the vehicle like 10000 hitpoints, set criticaldamage to 9000, set hplostwhilecritical to 0. This would mean it would be very difficult to destroy the vehicle (though still possible under extreme fire) and also have the downside that, if the vehicle has been badly damaged even after being disabled, it would take very long for mechanics to repair it again. At least with standard settings.

You could fix that by maybe giving the engineer a new weapon, a droppable repair station. It would be deployed, have a rather high repair rate for a very close vicinity and vanish after a fixed amount of seconds. To force the mechanic to actually be present, you can use the firedelay option (amount of time waited before the projectile is fired. Usually used for e.g. hand grenades, but can be nicely "abused"). Or - for bonus points - make the repair station a PCO that requires the mechanic to enter and press fire for the repair to work. Maybe a small crane object on a rotational bundle with a "repair-projectile" much like the wrench has, just that you need to direct it manually at the vehicle.

Another method that would fix both problems and be much less of a hazzle (spontaneous idea): Set an armoreffect to maybe 8000 that will spawn an invis. repair bubble, healing the vehicle instantly for e.g. 200 HP. This way the object under fire would constantly heal again once it reaches a "low treshold" and thus would practically be invincible. You'd need to set the damagetakenwhenlost value in the spawnertemplate of the vehicle insanely high though to overcome this "perma-healer" and make the vehicle actually go poof when it's abandoned.

Numbers are all just fillers, this was all very spontaneous...
User avatar
Senshi
 
Posts: 695
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany

Re: Vehicle that stops working but never dies..

Postby Apache Thunder » Tue Jul 20, 2010 10:26 pm

You can try setting it's critical damage close to it's current HP? You don't nessecerily have to raise the HP.

For example you have 100 HP, you set the critical damage to 90 HP or 80 HP and set the damage from being critical to 0 so it won't self destruct.
ImageImageImage

I have cameras in your head!
User avatar
Apache Thunder
 
Posts: 1192
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA

Next

Return to General discussion & notices

Who is online

Users browsing this forum: No registered users and 2 guests