Posted by: Rempit2502 - Saturday, March 15, 2008 7:41:08 PM
Is this the correct way to make a aircraft carrier to sink?
***IF***
Unit "Aircraft" is Less Then Or Equal to 90%
AND
Unit "Supw_ParticleCannonUplink"kill unit
***THEN***
Unit "Aircraft"has dealt a lethal damage
***IF***
Unit "Aircraft"has been killed,but still on the screen
***THEN***
Set unit "Aircraft" to topple at direction of X=150.00 Y=29.10 Z=82.46
Posted by: Me Myself and Pi - Sunday, March 16, 2008 12:44:05 PM
There are two different aircraft carrier objects. One launches aircraft & the other has the sinking animation. That one is called, CINE_AircraftCarrier in the Civilian\Vehicle folder. What you could do is just spawn that one & kill it when the launching aircraft carrier dies. Or you could just use this Map.ini file instead from cncmaps.com's forums: http://www.cncmaps.com/index.php?showtopic=1243. This Map.ini file will give the AmericaAircraftCarrier the sinking animation that the CINE_AircraftCarrier has.
Posted by: U-W-SAtomicarmy - Sunday, March 16, 2008 6:06:49 PM
I know this is off topic, but how do you get the aircraft carrier to move?
Posted by: Sky Demon - Monday, March 17, 2008 8:02:13 AM
There are others who know alot more than me on all this stuff but as no one else has posted any answer...Anyways.Basically the AirCraft carrier is not a unit, EA's engine counts it as a structure, hense it being able to rebuild lost raptors and not being able to move.
Even if it was converted to a unit somehow (I have no clue...) it would have no locomotor (Engine) to tell it what speed, what surface it can move on, speed to turn...
Although theoretically with a some experience and good sense you could add the AircraftCarrier to a build list and construct it like all buidable buildings are done, but then there would be a problem of the dozer getting onto the water/area to build the carrier...
Posted by: Me Myself and Pi - Monday, March 17, 2008 11:49:32 AM
Well, accually, it isn't to hard to do this. Although you may need to copy & paste the code into the AmericaVehicle.ini, I'm not sure if you have to though. But other then that, all you have to do is change the
[b]EditorSorting = STRUCTURE[/b] to [b]EditorSorting = VEHICLE[/b],
the [b]KindOf = PRELOAD STRUCTURE SELECTABLE IMMOBILE FS_AIRFIELD AIRCRAFT_CARRIER SCORE CAPTURABLE FS_FACTORY MP_COUNT_FOR_VICTORY CAN_ATTACK[/b], to [b]KindOf = PRELOAD VEHICLE SELECTABLE FS_AIRFIELD AIRCRAFT_CARRIER SCORE FS_FACTORY MP_COUNT_FOR_VICTORY CAN_ATTACK[/b],
& just add a locomoter, like, [b]Locomotor = SET_NORMAL BasicAmphibiousLocomotor[/b]
Posted by: Rempit2502 - Tuesday, March 18, 2008 4:34:15 AM
I'll post the map soon.But,the script isn't finish due to a problem of disappearing of waypoints for the trains and the vehicle on the road.The map's name is La Mer.Darn it.who deleted that map!!??
Posted by: Me Myself and Pi - Wednesday, March 19, 2008 5:03:44 AM
I'm confused about what your problem is. Could you reword that post.
Posted by: Yoshi714 - Wednesday, March 19, 2008 5:54:06 AM
Pi could that locomotor script be changed for tanks to make them travel through water AND on land? If the water was shallow so it looked like a puddle from rain?
Posted by: Me Myself and Pi - Wednesday, March 19, 2008 10:44:48 AM
Well all that you would need to do is modify the locomotor for all the ground vehicles. Here's the locomotor for the that transport:
[code]Locomotor BasicAmphibiousLocomotor
[b]Surfaces = GROUND WATER[/b]
Speed = 40 ; in dist/sec
SpeedDamaged = 30 ; in dist/sec
TurnRate = 180 ; in degrees/sec
TurnRateDamaged = 120 ; in degrees/sec
Acceleration = 30 ; in dist/(sec^2)
AccelerationDamaged = 20 ; in dist/(sec^2)
Lift = 120 ; in dist/(sec^2)
LiftDamaged = 80 ; in dist/(sec^2)
Braking = 50 ; in dist/(sec^2)
MinTurnSpeed = 0 ; in dist/sec
PreferredHeight = 4 ; at 1, 2, 3, the unit shakes from rounding. at 0 the SurfaceRelativeHeight flag is ignored.
AllowAirborneMotiveForce = Yes
ZAxisBehavior = SURFACE_RELATIVE_HEIGHT
Appearance = HOVER
PitchStiffness = 0.9 ; stiffness of the "springs" in the suspension forward & back.
RollStiffness = 0.95 ; stiffness of the "springs" in the suspension side to side.
PitchDamping = 0.9 ; How fast it damps. 0=perfect spring, bounces forever. 1=glued to terrain.
RollDamping = 0.9 ; How fast it damps. 0=perfect spring, bounces forever. 1=glued to terrain.
ForwardVelocityPitchFactor = -0.1 ; How much velocity will cause the front to lift/dip
LateralVelocityRollFactor = 0.1 ; How much cornering will cause the chassis to roll.
Apply2DFrictionWhenAirborne = Yes
AirborneTargetingHeight = 30
LocomotorWorksWhenDead = No ;
End[/code]
Notice the [b]Surfaces = GROUND WATER[/b]? All you need to do is add the WATER part to each of the locomotors. But here's an easy to change it fast:
1) Open up the Locomotor.ini in Word.
2) Press [b]ctrl + F[/b] & in the [b]Find & Replace[/b] window, click on the [b]Replace[/b] tab.
3) Copy this:
[b]Surfaces = GROUND[/b]
& paste it into the [b]Find What[/b] text field. Copy & Paste [b]Surfaces = GROUND WATER[/b] into the [b]Replace With[/b] text field. [b]Make sure there is a space after the word, WATER.[/b] Many locomotors have RUBBLE right after the GROUND, so if don't include that space, you'll then see [b]Surfaces = GROUND WATERRUBBLE[/b] & will undoughtly cause a crash.
4) Click [b]Replace All[/b] & then click [b]Yes[/b] if it asked you if you want to search the rest of the document.
Posted by: Yoshi714 - Wednesday, March 19, 2008 12:24:13 PM
Pi, will this allow buildings to be build in "puddles" as well?? or must I change the type of surface they can be built on as well... (your knowledge of INI's and scripting blows me away!! I'm working on learning as much as I can but even at the rate that I do it seems you have a whole world of this stuff I havnt even tapped yet)
EDIT - Ok, so this does NOT allow buildings to be built on top of my "puddles" which in my opinion are very nicely done, especially with the ability to walk through them.
I tried to alter the line the the building code that says:
KindOf = PRELOAD STRUCTURE SELECTABLE IMMOBILE REBUILD_HOLE CAN_SEE_THROUGH_STRUCTURE IMMUNE_TO_CAPTURE SCORE_DESTROY MP_COUNT_FOR_VICTORY
I first tried erasing STRUCTURE, then I tried swapping it with VEHICLE, neither worked. It crashes on load due to that object. I would assume maybe its because there are no locomotor properties associated with the movement of the "vehicle" building... maybe I could give it a locomotor that cant go anywhere?? Will that work??
Somehow vehicles are able to move accross Impassable terrain, im wondering if it is because they can traverse water... Anyhow, after adding that bit about them being able to cross water I went ahead and painted the river in the middle of the map impassable so that they couldnt get accross it as they can the puddles, but they can still cross it and I'm not sure why. I suppose it there is an invisible structure I can put along the banks, some sort of wall that could keep them out, but it wont stop para drops in the middle. this reminds me, a while ago someone asked how to make land able to be crossed but not built upon. This is the answer right here because if you drop the land by 1 value and put the water at the correct value so that its right inbetween those, than the land that is dropped still loooks like regular land yet you cant build on it because technically it is under water, although you cant hardly tell without going atleast 3 feet under.
Posted by: Me Myself and Pi - Thursday, March 20, 2008 6:04:01 AM
Hmm... I skimmed through a few INI files but couldn't find anything that would allow structures to be built in water. I'm a member over at deezire.net & that forum site is like completely devoted to C&C Modifying. I'll bring up this question there.
Here's the link to the topic so you can check it out: http://www.deezire.net/forums/generals-zero-hour-editing/8804-allowing-structures-build-water.html#post97589
[Edit]
I guy, Beng, has answered your question at that link. Check it out.
Posted by: Yoshi714 - Friday, March 21, 2008 6:35:16 PM
wow, that sounds complicated... Ill read it again when I have some time to mess with files and see if it looks worth the time. Mainly want to see if its going to affect anything else to go through all that.
Posted by: U-W-SAtomicarmy - Saturday, March 22, 2008 12:09:22 PM
[quote=Me Myself And Pi]Well, accually, it isn't to hard to do this. Although you may need to copy & paste the code into the AmericaVehicle.ini, I'm not sure if you have to though. But other then that, all you have to do is change the
[b]EditorSorting = STRUCTURE[/b] to [b]EditorSorting = VEHICLE[/b],
the [b]KindOf = PRELOAD STRUCTURE SELECTABLE IMMOBILE FS_AIRFIELD AIRCRAFT_CARRIER SCORE CAPTURABLE FS_FACTORY MP_COUNT_FOR_VICTORY CAN_ATTACK[/b], to [b]KindOf = PRELOAD VEHICLE SELECTABLE FS_AIRFIELD AIRCRAFT_CARRIER SCORE FS_FACTORY MP_COUNT_FOR_VICTORY CAN_ATTACK[/b],
& just add a locomoter, like, [b]Locomotor = SET_NORMAL BasicAmphibiousLocomotor[/b] [/quote]
I tried the code out, but it crashed the game?
Posted by: Me Myself and Pi - Saturday, March 22, 2008 1:35:22 PM
How did you use it?
Posted by: U-W-SAtomicarmy - Saturday, March 22, 2008 1:43:57 PM
Object_Aircraft_Carrier
EditorSorting = STRUCTURE to EditorSorting = VEHICLE
the KindOf = PRELOAD STRUCTURE SELECTABLE IMMOBILE FS_AIRFIELD AIRCRAFT_CARRIER SCORE CAPTURABLE FS_FACTORY MP_COUNT_FOR_VICTORY CAN_ATTACK
to KindOf = PRELOAD VEHICLE SELECTABLE FS_AIRFIELD AIRCRAFT_CARRIER SCORE FS_FACTORY MP_COUNT_FOR_VICTORY CAN_ATTACK
Locomotor = SET_NORMAL BasicAmphibiousLocomotor
End
Posted by: Me Myself and Pi - Saturday, March 22, 2008 6:31:12 PM
Sorry, I guess that was kind of a pointless question. I meant was, were you using it in a Map.ini or modifying the whole game. But I guess now it doesn't matter.
Anyway, I realised my mistake, you also need to change the [b]RadarPriority = STRUCTURE[/b] to [b]RadarPriority = UNIT[/b]
If it still crashes, upload the Map.ini/FactionBuilding.ini file so I can check it out.
Posted by: U-W-SAtomicarmy - Sunday, March 23, 2008 4:15:34 PM
Object_Aircraft_Carrier
EditorSorting = STRUCTURE to EditorSorting = VEHICLE
the KindOf = PRELOAD STRUCTURE SELECTABLE IMMOBILE FS_AIRFIELD AIRCRAFT_CARRIER SCORE CAPTURABLE FS_FACTORY MP_COUNT_FOR_VICTORY CAN_ATTACK
to KindOf = PRELOAD VEHICLE SELECTABLE FS_AIRFIELD AIRCRAFT_CARRIER SCORE FS_FACTORY MP_COUNT_FOR_VICTORY CAN_ATTACK
Locomotor = SET_NORMAL BasicAmphibiousLocomotor
RadarPriority = UNIT
End
Its still crashing
Posted by: Me Myself and Pi - Monday, March 24, 2008 1:14:58 PM
[quote=Me Myself And Pi]If it still crashes, upload the Map.ini/FactionBuilding.ini file so I can check it out. [/quote]
Posted by: U-W-SAtomicarmy - Tuesday, March 25, 2008 2:51:12 PM
Object AmericaAircraftCarrier
; *** ART Parameters ***
SelectPortrait = SACarrier_L
ButtonImage = SACarrier_L
Draw = W3DModelDraw ModuleTag_01
ReceivesDynamicLights = No
ExtraPublicBone = Runway1Prep1
ExtraPublicBone = Runway1Prep2
ExtraPublicBone = Runway1Prep3
ExtraPublicBone = Runway1Prep4
ExtraPublicBone = Runway1Prep5
ExtraPublicBone = Runway1Prep6
ExtraPublicBone = Runway1Prep7
ExtraPublicBone = Runway1Prep8
ExtraPublicBone = Runway1Prep9
ExtraPublicBone = RunwayStart1
ExtraPublicBone = RunwayEnd1
ExtraPublicBone = RunwayLDEnd1
ExtraPublicBone = RunwayLDStart1
ExtraPublicBone = Runway2Prep1
ExtraPublicBone = Runway2Prep2
ExtraPublicBone = Runway2Prep3
ExtraPublicBone = Runway2Prep4
ExtraPublicBone = Runway2Prep5
ExtraPublicBone = Runway2Prep6
ExtraPublicBone = Runway2Prep7
ExtraPublicBone = Runway2Prep8
ExtraPublicBone = Runway2Prep9
ExtraPublicBone = RunwayStart2
ExtraPublicBone = RunwayEnd2
ExtraPublicBone = RunwayLDEnd2
ExtraPublicBone = RunwayLDStart2
ExtraPublicBone = Taxi1
ExtraPublicBone = Taxi2
ExtraPublicBone = Taxi3
ExtraPublicBone = Taxi4
ExtraPublicBone = Taxi5
ExtraPublicBone = Taxi6
ExtraPublicBone = Hanger1
OkToChangeModelColor = Yes
; day ********************************************
DefaultConditionState
Model = PSAirCarrier
Animation = PSAirCarrier.PSAirCarrier
AnimationMode = LOOP
ParticleSysBone = BOWWAKE AirCarrierWaterRipples
ParticleSysBone = LEFTWAKE AirCarrierWaterRipples
ParticleSysBone = RIGHTWAKE AirCarrierWaterRipples
ParticleSysBone = BOWWAKEL AirCarrierWaterRipples
ParticleSysBone = BOWWAKERB AirCarrierWaterRipples
End
; day moving********************************************
ConditionState = MOVING
Model = PSAirCarrier
Animation = PSAirCarrier.PSAirCarrier
AnimationMode = LOOP
ParticleSysBone = BOWWAKE AirCarrierBowWake
ParticleSysBone = LEFTWAKE AirCarrierSideWake
ParticleSysBone = RIGHTWAKE AirCarrierSideWake
ParticleSysBone = PROPELLERWAKE AirCarrierPropWake
ParticleSysBone = BOWWAKEL AirCarrierWaterWake
ParticleSysBone = BOWWAKERB AirCarrierWaterWakePort
End
; night ******************************************
ConditionState = NIGHT
Model = PSAirCarrier_N
Animation = PSAirCarrier_N.PSAirCarrier_N
AnimationMode = LOOP
End
ConditionState = NIGHT SNOW
Model = PSAirCarrier_NS
Animation = PSAirCarrier_NS.PSAirCarrier_NS
AnimationMode = LOOP
End
End
;Below deck hangar
Draw = W3DModelDraw ModuleTag_02
OkToChangeModelColor = Yes
ReceivesDynamicLights = No
DefaultConditionState
Model = PSAirCarrier_A2
Animation = PSAirCarrier_A2.PSAirCarrier_A2
AnimationMode = ONCE_BACKWARDS
Flags = START_FRAME_FIRST
End
ConditionState = DOOR_1_OPENING
AnimationMode = ONCE
Flags = START_FRAME_FIRST
End
ConditionState = DOOR_1_WAITING_OPEN
AnimationMode = ONCE
Flags = START_FRAME_LAST
End
End
;Launch blast blocks
Draw = W3DModelDraw ModuleTag_03
ReceivesDynamicLights = No
DefaultConditionState
Model = PSAirCarrier_A3
Animation = PSAirCarrier_A3.PSAirCarrier_A3
AnimationMode = ONCE_BACKWARDS
Flags = START_FRAME_FIRST
End
ConditionState = DOOR_2_OPENING
AnimationMode = ONCE
Flags = START_FRAME_FIRST
End
ConditionState = DOOR_2_CLOSING
AnimationMode = ONCE_BACKWARDS
Flags = START_FRAME_LAST
End
End
Draw = W3DModelDraw ModuleTag_04
ReceivesDynamicLights = No
DefaultConditionState
Model = PSAirCarrier_A1
Animation = PSAirCarrier_A1.PSAirCarrier_A1
AnimationMode = ONCE_BACKWARDS
Flags = START_FRAME_FIRST
End
ConditionState = DOOR_3_OPENING
AnimationMode = ONCE
Flags = START_FRAME_FIRST
End
ConditionState = DOOR_3_CLOSING
AnimationMode = ONCE_BACKWARDS
Flags = START_FRAME_LAST
End
End
PlacementViewAngle = -45
; ***DESIGN parameters ***
DisplayName = OBJECT:AircraftCarrier
Side = America
EditorSorting = STRUCTURE
Prerequisites
;None
End
BuildCost = 0
BuildTime = 30.0 ; in seconds
EnergyProduction = 0
CommandSet = AmericaAircraftCarrierCommandSet
VisionRange = 200.0 ; Shroud clearing distance
ShroudClearingRange = 200
WeaponSet
Conditions = None
Weapon = PRIMARY AircraftCarrierOrderLaunch
End
ArmorSet
Conditions = None
Armor = StructureArmor
DamageFX = StructureDamageFXNoShake
End
ExperienceValue = 150 150 150 150 ; Experience point value at each level
; *** AUDIO Parameters ***
VoiceSelect = AircraftCarrierVoiceSelect
VoiceAttack = AircraftCarrierVoiceAttack
VoiceMove = AircraftCarrierVoiceMove
SoundOnDamaged = BuildingDamagedStateLight
SoundOnReallyDamaged = BuildingDestroy
UnitSpecificSounds
UnderConstruction = UnderConstructionLoop
End
; *** ENGINEERING Parameters ***
RadarPriority = STRUCTURE
KindOf = PRELOAD STRUCTURE SELECTABLE IMMOBILE FS_AIRFIELD AIRCRAFT_CARRIER SCORE CAPTURABLE FS_FACTORY MP_COUNT_FOR_VICTORY CAN_ATTACK
Body = ImmortalBody ModuleTag_10
MaxHealth = 1.0
InitialHealth = 1.0
End
Behavior = FlightDeckBehavior ModuleTag_11
NumRunways = 2
NumSpacesPerRunway = 10
Runway1Spaces = RunwayStart1 Runway1Prep1 Runway1Prep2 Runway1Prep3 Runway1Prep4 Runway1Prep5 Runway1Prep6 Runway1Prep7 Runway1Prep8 Runway1Prep9
Runway1Takeoff = RunwayStart1 RunwayEnd1
Runway1Landing = RunwayLDStart1 RunwayLDEnd1
Runway1Taxi = Taxi2 Taxi3 Taxi4 Taxi6
Runway1Creation = Hanger1 Taxi4 Taxi6
Runway1CatapultSystem = AircraftCarrierCatapultSteamParent
Runway2Spaces = RunwayStart2 Runway2Prep1 Runway2Prep2 Runway2Prep3 Runway2Prep4 Runway2Prep5 Runway2Prep6 Runway2Prep7 Runway2Prep8 Runway2Prep9
Runway2Takeoff = RunwayStart2 RunwayEnd2
Runway2Landing = RunwayLDStart2 RunwayLDEnd2
Runway2Taxi = Taxi1 Taxi3 Taxi5
Runway2Creation = Hanger1 Taxi4
Runway2CatapultSystem = AircraftCarrierCatapultSteamParent
HealAmountPerSecond = 20
ApproachHeight = 50
LandingDeckHeightOffset = 45.0
ParkingCleanupPeriod = 533 ;How often the carrier checks to move planes forward in the queue to fill empty spaces
HumanFollowPeriod = 333 ;Human factor for delay like a traffic jam.. takes time to react when the guy in front moves.
;Template of payload, and how quickly destroyed ones get replaced.
PayloadTemplate = AmericaJetAircraftCarrierRaptor
ReplacementDelay = 4000
DockAnimationDelay = 3000
;How quickly a wave of fighters can be launched.
LaunchWaveDelay = 3000
LaunchRampDelay = 667
LowerRampDelay = 600
CatapultFireDelay = 750
End
Behavior = ProductionUpdate ModuleTag_12
NumDoorAnimations = 1
DoorOpeningTime = 3000 ;matches the dock animation timing.
DoorWaitOpenTime = 33 ;add a single frame to hold the plane because there is a one frame delay before we see the new plane
DoorCloseTime = 0 ;in mSeconds
ConstructionCompleteDuration = 0 ;in mSeconds
End
Behavior = BaseRegenerateUpdate ModuleTag_13
;No data
End
Behavior = DestroyDie ModuleTag_14
;nothing
End
Behavior = CreateObjectDie ModuleTag_15
CreationList = OCL_ABPowerPlantExplode
End
Behavior = FXListDie ModuleTag_17
DeathFX = FX_StructureMediumDeath
End
Behavior = FlammableUpdate ModuleTag_19
AflameDuration = 5000 ; If I catch fire, I'll burn for this long...
AflameDamageAmount = 5 ; taking this much damage...
AflameDamageDelay = 500 ; this often.
End
Behavior = TransitionDamageFX ModuleTag_31
;-------------DESIGNED FOR MEDIUM SIZED FACTION BUILDING TRANSITIONS-------------------
DamagedParticleSystem1 = Bone:None RandomBone:No PSys:StructureTransitionMediumSmoke
;---------------------------------------------------------------------------------------
ReallyDamagedParticleSystem1 = Bone:None RandomBone:No PSys:StructureTransitionMediumSmoke
ReallyDamagedParticleSystem2 = Bone:None RandomBone:No PSys:StructureTransitionMediumExplosion
ReallyDamagedParticleSystem3 = Bone:None RandomBone:No PSys:StructureTransitionMediumShockwave
End
Geometry = BOX
GeometryMajorRadius = 112.0
GeometryMinorRadius = 74.0
GeometryHeight = 25.0
GeometryIsSmall = No
FactoryExitWidth = 25
Shadow = SHADOW_VOLUME
BuildCompletion = PLACED_BY_PLAYER
End
Posted by: Me Myself and Pi - Tuesday, March 25, 2008 3:49:46 PM
lol, could you upload your modified code please? [+1] That the original there.
Posted by: U-W-SAtomicarmy - Tuesday, March 25, 2008 3:57:13 PM