AdrianeMapMaker
9 years ago
note: i have the original or the first version gen:wb
Is there's a way how to make fly a cropduster or aircraftcessna
coz i see them flying in the generals:zh:wb
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




Sponsor
klingondragon
9 years ago
Have a look at their object code, see if they have a locomotor. If they do have a look at their locomotor code and play with that, if they don't add a flying locomotor.
AdrianeMapMaker
9 years ago
Can You Send Any Examples ... By The Way ,where do I Locate Locomotor in ini data
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




acidbrain
9 years ago
If im not mistaking you also have to give the plane a JetAIUpdate module...
Panem et kirkinses
klingondragon
9 years ago
Right, so, I've checked the cropduster's code. there's no locomotor so you can either use an existing one or create a new one in locomotor.ini .
As for the JetAI module, you only need this if your crop duster is being used as a buildable aircraft from an airfield.

JetAIUpdate
[this module allows the use of VoiceLowFuel and Afterburner within UnitSpecificSounds section of the object -Requires Kindof = AIRCRAFT]
[And Allows the use of JETEXHAUST JETAFTERBURNER Model conditionstates, this is triggered when its taking off from the runway]
	OutOfAmmoDamagePerSecond      = [percent]  ; Amount of damage to take per SEC (not per frame) when out of ammo
	NeedsRunway                   = [Yes/No]   ; Does the aircraft need a runway when it takes off?
	KeepsParkingSpaceWhenAirborne = [Yes/No]   ; Does the aircraft that took off from that "hanger" keeps it or not?
	TakeoffDistForMaxLift         = [percent]  ; Larger numbers give more lift sooner when taking off
	TakeoffPause                  = [millisecond]  ; How long does the aircraft pause for a moment before taking off?
	MinHeight                     = [integer]   ; How low can the aircraft go? offsets using the Z axis 
	ParkingOffset                 = 😠.0 offsets the plane to the rear, X.0 offsets it foward, X can be any number]  ; scooch it a little forward so the tail doesn't hit the doors  
	SneakyOffsetWhenAttacking     = [integer]   ; This is how far behind us people aim when we are in attack mode 
	AttackLocomotorType           = [LocomotorSetType] ; what locomotor set are we going to use if we're in attack mode?
	AttackLocomotorPersistTime    = [real number]  ;how long the "attack" locomotor persist after we finished attacking? 
	AttackersMissPersistTime      = [real number]  ;how long do we remain unattackable when the attackmode is done?
	ReturnToBaseIdleTime = [integer, milliseconds] ; if idle for this long, return to base, even if not out of ammo
	ReturnForAmmoLocomotorType    = [LocomotorSetType] ; what locomotor set are we going to use if we're going back to re-arm?
	LockonTime                    = [integer, milliseconds] ; how long does the lockon tick sound last?
	LockonCursor                  = [object name] ;what should the "lockon" cursor look like? (use LockonCursor defined in system.ini)
	LockonInitialDist             = [integer]     ; how far does the enemy anti-air required to trigger this
	LockonFreq                    = [real number] ; smaller==longer pulse delay, larger==shorter pulse delay
	LockonAngleSpin               = [real number] ;how fast to spin the lockon blinker 
	LockonBlinky                  = [Yes/No]      ; does it blinker?
	AutoAcquireEnemiesWhenIdle    = [Yes/No NOTWHILEATTACKING/ATTACK_BUILDINGS/STEALTHED]
	MoodAttackCheckRate           = [integer, milliseconds, default is 2000]
	Turret
     	    TurretTurnRate = [integer]
            TurretPitchRate = [integer]
            NaturalTurretAngle = [integer]
            NaturalTurretPitch = [integer]
            FirePitch = [integer]
            MinPhysicalPitch = [integer, defalt 0 = horizontal]
            GroundUnitPitch = [integer, default 0 = horizontal] 
            TurretFireAngleSweep = [weaponslot][integer]
            TurretSweepSpeedModifier = [weaponslot	real number]
            ControlledWeaponSlots = [weaponslots]
            AllowsPitch = [Yes/No]
            MinIdleScanAngle = [real number]
            MaxIdleScanAngle = [real number]
            MinIdleScanInterval = [integer, milliseconds]
            MaxIdleScanInterval = [integer, milliseconds]
            RecenterTime = [integer,milliseconds]
            FiresWhileTurning = [Yes/No]
            InitiallyDisabled = [Yes/No]
	End
	AltTurret
		[as above]
	End
End

acidbrain
9 years ago
Dug up some old stuff from missions i made, used the cropduster several times to drop some infantry...



First example, this is for scripted use by ai, cropduster drops a worker...
Used it for the Demolition General...

Object Demo_GLACommandCenter
  AddModule
    Behavior = OCLSpecialPower Module_Para
      SpecialPowerTemplate        = Infa_SuperweaponInfantryParadrop
      OCL                         = Infa_SUPERWEAPON_Paradrop1
      CreateLocation              = CREATE_AT_EDGE_NEAR_SOURCE
      OCLAdjustPositionToPassable = Yes
    End
  End
End

;---------

Object AircraftCropDuster
  Side = GLADemolitionGeneral
  RadarPriority = UNIT
  KindOf = PRELOAD CAN_CAST_REFLECTIONS VEHICLE TRANSPORT AIRCRAFT SCORE FORCEATTACKABLE IGNORED_IN_GUI CAN_ATTACK EMP_HARDENED
  
  RemoveModule ModuleTag_09

  AddModule
    Behavior = DeliverPayloadAIUpdate Module_Deliver
      DoorDelay        = 500
      MaxAttempts      = 4
      DropOffset       = X:0 Y:0 Z:-10
      PutInContainer   = AmericaParachute
      DeliveryDistance = 150
    End
    Locomotor = SET_NORMAL B52Locomotor

    Behavior = TransportContain Module_Contain
      Slots                            = 1
      ScatterNearbyOnExit              = No
      OrientLikeContainerOnExit        = Yes
      KeepContainerVelocityOnExit      = Yes
      ExitPitchRate                    = 30
      ExitBone                         = WeaponA01
      AllowInsideKindOf                = INFANTRY
      DoorOpenTime                     = 0
      NumberOfExitPaths                = 0
      DestroyRidersWhoAreNotFreeToExit = Yes
    End
  End
End

;---------

SpecialPower Infa_SuperweaponInfantryParadrop
  Enum               = INFA_SPECIAL_PARADROP_AMERICA
  ReloadTime         = 1000 ;every second, it's script only
  RequiredScience    = Infa_SCIENCE_InfantryParadrop1
  PublicTimer        = No
  SharedSyncedTimer  = Yes
  RadiusCursorRadius = 50
  ShortcutPower      = No
  AcademyClassify    = ACT_SUPERPOWER
End

;---------

ObjectCreationList Infa_SUPERWEAPON_Paradrop1
  DeliverPayload
    Transport              = AircraftCropDuster
    StartAtPreferredHeight = Yes
    StartAtMaxSpeed        = Yes
    MaxAttempts            = 4
    DropOffset             = X:0 Y:0 Z:-10
    ParachuteDirectly      = Yes
    PutInContainer         = AmericaParachute
    Payload                = Demo_GLAInfantryWorker 1
    DeliveryDistance       = 0
    PreOpenDistance        = 300 
    DeliveryDecalRadius    = 50
    DeliveryDecal
      Texture                   = SCCParadrop_USA
      Style                     = SHADOW_ALPHA_DECAL
      OpacityMin                = 25%
      OpacityMax                = 50%
      OpacityThrobTime          = 500
      Color                     = R:227 G:229 B:22 A:255 
      OnlyVisibleToOwningPlayer = Yes
    End
  End
End

;---------

CommandSet Demo_GLACommandCenterCommandSet
  1  = Demo_Command_ConstructGLAWorker
  2  = Infa_Command_Paradrop
  4  = Command_GPSScrambler
  5  = Command_Ambush
  6  = Command_EmergencyRepair
  7  = Command_AnthraxBomb
  8  = Command_SneakAttack
  13 = Command_SetRallyPoint
  14 = Command_Sell
End

Script in wb, set your own conditions, used if true because it is an example, demo gen is team green in scripting
*** IF ***
    True.
*** THEN ***
   Team 'teamGreen' use Ability 'Infa_Command_Paradrop' at Waypoint 'Drop_Worker_Here'.

;-------------------------------------------------------------------------------

Second example, cropduster drops a hacker, can be used by player.
An InternetCenter from the Nuke General is placed on the map which is capturable by the player.
The player is the airforce general so SCIENCE_CHINA and Infa_SCIENCE_InfantryParadrop1 are granted when the player owns the building with a script, the player is named player blue in scripting. 

Object AircraftCropDuster

  Side = ChinaInfantryGeneral
  RadarPriority = UNIT
  KindOf = PRELOAD CAN_CAST_REFLECTIONS VEHICLE TRANSPORT AIRCRAFT SCORE FORCEATTACKABLE IGNORED_IN_GUI CAN_ATTACK EMP_HARDENED
  
  RemoveModule ModuleTag_09

  AddModule
    Behavior = DeliverPayloadAIUpdate Module_Deliver
      DoorDelay = 500
      MaxAttempts = 4
      DropOffset = X:0 Y:0 Z:-10
      PutInContainer = AmericaParachute
      DeliveryDistance = 150
    End
    Locomotor = SET_NORMAL B52Locomotor
    Behavior = TransportContain Module_Contain
      Slots = 1
      ScatterNearbyOnExit = No
      OrientLikeContainerOnExit = Yes
      KeepContainerVelocityOnExit = Yes
      ExitPitchRate = 30
      ExitBone = WeaponA01
      AllowInsideKindOf  = INFANTRY
      DoorOpenTime = 0
      NumberOfExitPaths = 0
      DestroyRidersWhoAreNotFreeToExit = Yes
    End
  End
End

;---------

;Increase the reloadtime with 2 minutes.
SpecialPower Infa_SuperweaponInfantryParadrop
  Enum                = INFA_SPECIAL_PARADROP_AMERICA
  ReloadTime          = 360000 ;every 6 minutes
  RequiredScience     = Infa_SCIENCE_InfantryParadrop1
  PublicTimer         = No
  SharedSyncedTimer   = Yes
  RadiusCursorRadius  = 50
  ShortcutPower       = No
  AcademyClassify     = ACT_SUPERPOWER
End

;---------

;Same as original, only used for adjustments of the strings.
CommandButton Infa_Command_Paradrop
  Command           = SPECIAL_POWER
  SpecialPower      = Infa_SuperweaponInfantryParadrop
  Options           = NEED_SPECIAL_POWER_SCIENCE NEED_TARGET_POS CONTEXTMODE_COMMAND
  Science           = Infa_SCIENCE_InfantryParadrop1
  TextLabel         = CONTROLBAR:HackerParadrop  ;In the map.str file
  ButtonImage       = SACParatroopers
  ButtonBorderType  = ACTION
  DescriptLabel     = CONTROLBAR:TooltipHackerParaDrop  ;In the map.str file
  RadiusCursorType  = PARADROP
  InvalidCursorName = GenericInvalid
End

;---------

;Drop 1 Hacker with a CropDuster
ObjectCreationList Infa_SUPERWEAPON_Paradrop1
  DeliverPayload
    Transport              = AircraftCropDuster
    StartAtPreferredHeight = Yes
    StartAtMaxSpeed        = Yes
    MaxAttempts            = 4
    DropOffset             = X:0 Y:0 Z:-10
    ParachuteDirectly      = Yes
    PutInContainer         = AmericaParachute
    Payload                = Infa_ChinaInfantryHacker 1
    DeliveryDistance       = 0
    PreOpenDistance        = 300 
    DeliveryDecalRadius    = 50
    DeliveryDecal
      Texture              = SCCParadrop_USA
      Style                = SHADOW_ALPHA_DECAL
      OpacityMin           = 25%
      OpacityMax           = 50%
      OpacityThrobTime     = 500
      Color                = R:227 G:229 B:22 A:255 
      OnlyVisibleToOwningPlayer = Yes
    End
  End
End

;---------

CommandSet InternetCenterCommandSetOne
  1 = Command_StructureExit
  2 = Command_StructureExit
  3 = Command_StructureExit
  4 = Command_StructureExit
  5 = Command_StructureExit
  6 = Command_StructureExit
  7 = Command_StructureExit
  8 = Command_StructureExit
  9 = Command_Evacuate 
  11 = Command_UpgradeChinaSatelliteHackOne
  13 = Infa_Command_Paradrop
  14 = Command_UpgradeChinaMines 
End

;---------

CommandSet InternetCenterCommandSetTwo
  1 = Command_StructureExit
  2 = Command_StructureExit
  3 = Command_StructureExit
  4 = Command_StructureExit
  5 = Command_StructureExit
  6 = Command_StructureExit
  7 = Command_StructureExit
  8 = Command_StructureExit
  9 = Command_Evacuate 
  11 = Command_UpgradeChinaSatelliteHackTwo
  13 = Infa_Command_Paradrop
  14 = Command_UpgradeChinaMines 
End

;---------

Object Nuke_ChinaInternetCenter

  CommandSet = InternetCenterCommandSetOne
  KindOf            = PRELOAD STRUCTURE SELECTABLE IMMOBILE CAN_ATTACK FS_INTERNET_CENTER ;IMMUNE_TO_CAPTURE SCORE MP_COUNT_FOR_VICTORY
  RemoveModule ModuleTag_31
   
  ReplaceModule ModuleTag_32
    Behavior = CommandSetUpgrade ModuleTag_32_Override
      CommandSet  = InternetCenterCommandSetTwo
      TriggeredBy = Upgrade_ChinaSatelliteHackOne
    End
  End

  AddModule
    Behavior = OCLSpecialPower Module_Para
      SpecialPowerTemplate = Infa_SuperweaponInfantryParadrop
      OCL                  = Infa_SUPERWEAPON_Paradrop1
      CreateLocation       = CREATE_AT_EDGE_NEAR_SOURCE
      OCLAdjustPositionToPassable = Yes
    End
  End
End

;---------

Script in wb
*** IF ***
     Unit 'InternetCenter' is owned by Player 'Blue'
*** THEN ***
   Player 'Blue' is granted Science 'SCIENCE_CHINA'.
   Player 'Blue' is granted Science 'Infa_SCIENCE_InfantryParadrop1'.


Have fun
Panem et kirkinses
klingondragon
9 years ago
I once used the cropduster to make anthrax suicide planes for the GLA.
AdrianeMapMaker
9 years ago
can you modified the original cropduster or an cesna to make it fly pls .... iam such noob with this ... By the way where do found this locomotor codes the Set_normal blah blah codes


 AddModule
    Behavior = DeliverPayloadAIUpdate Module_Deliver
      DoorDelay        = 500
      MaxAttempts      = 4
      DropOffset       = X:0 Y:0 Z:-10
      PutInContainer   = AmericaParachute
      DeliveryDistance = 150
    End
    Locomotor = SET_NORMAL B52Locomotor

A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




klingondragon
9 years ago
is this for a map.ini or a mod?
AdrianeMapMaker
9 years ago
ini only

A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




klingondragon
9 years ago
In a map.ini it should be as simple as (this code is from memory, I'll fix it after my great grandad's birthday party):

Object Cropduster
  Locomoter = SET_NORMAL JetPlaneLocomotor
End

AdrianeMapMaker
9 years ago
is it working?

A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




acidbrain
9 years ago

is it working?

Originally Posted by: adrianemapmaker 


If you keep copy/pasting solutions which were made by others you will never learn how to code Adriane, jus try and see what works, start with one line of code in a map.ini and see what happens ingame...
If you want the cropduster or cesna to fly you need a jetaiupdate with a locomotor or a deliverpayloadaiupdate with a locomotor...
Just experiment with the code and Learn, be your own teacher, try it yourself first before you ask a question, at this moment in time you expect working code from others and that is in my honest opinion not good for your learning curve, you just copy/paste now and if it works you go to the next problem while you didn't learn what was done to solve your previous problem...
This is not an attack but I am trying to make you aware, it just feels great if you solve your own problem and if you want to be a good modder who brings something new to the table which is quite hard nowadays since the game is pretty old it is the only way to go...
Im not saying that you cant ask questions, let that be crystal clear...

Cheers

Panem et kirkinses
klingondragon
9 years ago
I agree that you should learn to mod yourself but sometimes having something to copy (especially when starting out) can be of a massive help.

Also some of the advice, on this topic in particular, people give is often not needed.

I have provided a map with a flying cropduster. note that it doesn't

need a jetaiupdate with a locomotor or a deliverpayloadaiupdate with a locomotor

and all it needs is a locomotor with the surface set to AIR (the object already has a locomotor but it's the ground one used by most civilian cars).   Fly.zip (5kb) downloaded 7 time(s).
acidbrain
9 years ago
Klingon you are the best...😁
Panem et kirkinses
klingondragon
9 years ago
Why do I get the feeling you're not serious.
zero hour mad map maker
9 years ago
Geez! All this stuff to make a crop duster fly!? *mind BLOWN*
Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
AdrianeMapMaker
9 years ago


Just experiment with the code and Learn

Originally Posted by: acidbrain 



By The Way Let Say's .. Im A Little Bit Had Phobia about my Game.. i Have Already experienced the Game Doesnt Save any Game's when i try to save it .. and in that time ,it make me depressed

... By the Way Did you know the Cause Of it ?

is it the worldbuilder? with the game .... ? when you save the game in your specific map and then i will change that map , it will cause a error ???



A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




acidbrain
9 years ago

Geez! All this stuff to make a crop duster fly!? *mind BLOWN*

Originally Posted by: Zero Hour Mad Map Maker 


You didn't help in any way on this thread and yet you feel the need to post this comment, what does that say about you ZHMMM?
Please do enlighten us with your knowledge so we can all learn...😎

Panem et kirkinses
zero hour mad map maker
9 years ago

Klingon you are the best...😁

Originally Posted by: acidbrain 



This doesn't help in any way either 😛........


You didn't help in any way on this thread and yet you feel the need to post this comment, what does that say about you ZHMMM?
Please do enlighten us with your knowledge so we can all learn...😎

Originally Posted by: acidbrain 




Nor does this. Does that answer Adrian's recent question? You just felt the need to post to get me in "trouble" What does that say about you😁
*****


Regarding Adrian's question:



By The Way Let Say's .. Im A Little Bit Had Phobia about my Game.. i Have Already experienced the Game Doesnt Save any Game's when i try to save it .. and in that time ,it make me depressed

... By the Way Did you know the Cause Of it ?

is it the worldbuilder? with the game .... ? when you save the game in your specific map and then i will change that map , it will cause a error ???


Originally Posted by: adrianemapmaker 





So what do you mean the game does NOT save when you try to save it? Is this an in game problem? Or a worldbuilder?

From what I am getting from this (sorry your English is a bit hard to understand, but that's ok 😉 ) When you test your map in game, exit to the main menu, then hit that start button. Yes, you can edit your map whilst the game is still running in the background as long as it's on the MAIN Menu screen. Make your changes to the map, save it in World Builder; then simply go back to Generals -> Skirmish -> your map.


Now if it's a saving error in World Builder, make sure in the Custom maps folder you have a file called Worldbuilder.ini.
Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator