logo   login
right
Home Forums Downloads Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Forum Info
Forum Members: 18,679
Total Threads: 8,804
Posts: 95,887

Administrators:
DeeZire, Redemption

There are currently 19 users online.
Partner Links

Free Credit Repair

Learn the Ticket Broker Secrets
Advertisements

DeeZire Online > Editing Community > Command and Conquer Editing > Generals & Zero Hour Editing » Switching between ground/ flight and other stuff.

Generals & Zero Hour Editing Discuss any modding related issues to do with Generals and Zero Hour here.

Reply
 
LinkBack Thread Tools
Old 04-27-2005, 07:20 PM   #1 (permalink)
Senior Member
 
Join Date: May 2004
Posts: 144
Default Switching between ground/ flight and other stuff.

I'd like to know if it is possible to have a unit change from ground movement to flight and so on through a command button.

I'd also like to know if it is possible to turn on and off individual weapons for fire managment purposes.

I'm starting the designwork for a large unit that carries a wide array of weapons. For those of you who know remember TA, it's going to be an over the top Krogoth type unit. :drunk:
Thinimus is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-27-2005, 07:59 PM   #2 (permalink)
Member
 
Join Date: Feb 2003
Location: USA
Posts: 55
Default

I can tell you how to make only certain weapons fire.

In you CommandSet have
Code:
CommandSet VehicleNameCommandSet
   1 = Command_Weaponnameone
   2 = Command_weaponnametwo
  11 = Command_AttackMove
  13 = Command_Guard
  14 = Command_Stop
End
so on and so forth. and in command button have

Code:
CommandButton Command_Weaponnameone
  Command                 = SWITCH_WEAPON
  WeaponSlot              = PRIMARY
  Options                 = CHECK_LIKE OK_FOR_MULTI_SELECT
  TextLabel               = CONTROLBAR:Weaponnameone
  ButtonImage             = WeaponImage
  ButtonBorderType        = ACTION ; Identifier for the User as to what kind of button this is
  DescriptLabel           = CONTROLBAR:Weaponnameone
End

CommandButton Command_Weaponnametwo
  Command                 = SWITCH_WEAPON
  WeaponSlot              = SECONDARY TERTIARY
  Options                 = CHECK_LIKE OK_FOR_MULTI_SELECT
  TextLabel               = CONTROLBAR:Weaponnametwo
  ButtonImage             = Weapon2image
  ButtonBorderType        = ACTION ; Identifier for the User as to what kind of button this is
  DescriptLabel           = CONTROLBAR:Weaponnametwo
End
and lastly make sure the bones are set up in the vehicle.ini like this

Code:
  Draw = W3DTankDraw ModuleTag_01
    DefaultConditionState
      Model               = ModleName
      Turret              = Turret
      WeaponFireFXBone    = PRIMARY TurretMS
      WeaponRecoilBone    = PRIMARY Barrel
      WeaponMuzzleFlash   = PRIMARY TurretFX
      WeaponLaunchBone = PRIMARY TurretMS
      WeaponFireFXBone = Secondary TurretMS2 ; or whatever the secondary turret is
      WeaponMuzzleFlash   = Secondary MuzzleFX
    End
and so on and whatever. Somethings might be incorrect since i was really tired when i did it and forgot where things are. But my unit does work ingame with this code.
Aut665 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-27-2005, 08:54 PM   #3 (permalink)
Senior Member
 
Join Date: Jul 2004
Location: London, UK
Posts: 376
Send a message via MSN to AntiSocialKindaGuy
Default

Quote:
I'd like to know if it is possible to have a unit change from ground movement to flight and so on through a command button.
Presumably via a change in locomotor using bike logic ( if you can get it to work ).
AntiSocialKindaGuy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-01-2005, 06:35 PM   #4 (permalink)
Senior Member
 
Join Date: May 2004
Posts: 144
Default

Here's a work in progress shot of some of the model:




This is my first unit so it will take some time.

(Some of you might recognize this thing. )
Thinimus is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-02-2005, 03:41 AM   #5 (permalink)
Senior Member
 
Join Date: Apr 2003
Location: Derby, UK / Den Haag, NL
Posts: 590
Default

Generals doesn't support temporary locomotor upgrades, meaning that you can't switch between ground and flight modes, irritating as it is, I don't think there's a hack for it either
Ambershee is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-02-2005, 04:57 AM   #6 (permalink)
Senior Member
 
Join Date: Sep 2001
Posts: 734
Send a message via ICQ to Flyby
Default

True.. but you don't have to take the Upgrade path as that is a dead end.
The bike logic will allow you to swap locomotors.
Flyby is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-02-2005, 10:14 AM   #7 (permalink)
Senior Member
 
Join Date: May 2004
Posts: 134
Default

replaceobject module with two upgrades can surely allow you switch between tank and flight mode, but the problem is HP, EXP will not inherit, and after switch you will lose select state of the unit
homura is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-02-2005, 12:27 PM   #8 (permalink)
Senior Member
 
Join Date: Mar 2003
Location: Rep. of Ireland
Posts: 373
Default

Use createobjectdie to transfer energy and veterency.
Waraddict is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-02-2005, 12:29 PM   #9 (permalink)
Senior Member
 
Join Date: May 2004
Posts: 144
Default

I might look up and do something with the Aurora logic or drone panic logic.

Right now I have it sliding around while hovering. I gave it an AIR locomotor and replaced the Crusader with some ini modifications just for some testing.

Problem is that anti-ground weapons aim at about 5000 units above the new unit and slow the game to a crawl.

I had replaced it with a GROUND and it worked fine, but If I go that route, I'll need to make something up for "flying" over cliffs.
Thinimus is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-02-2005, 12:59 PM   #10 (permalink)
Senior Member
 
Join Date: Mar 2003
Location: Rep. of Ireland
Posts: 373
Default

How to replace a unit and transfer health and veterancy:

Give it this to the unit you wish to change as a Primary weapon

Code:
Weapon DeployWeapon
  LeechRangeWeapon = Yes
  AttackRange = 1.0
  PrimaryDamage = 999999.0            
  PrimaryDamageRadius = 1.0      
  DamageDealtAtSelfPosition = Yes   ; this is a suicide bomber... remember?
  RadiusDamageAffects = SELF SUICIDE
  DamageType = EXPLOSION
  DeathType = EXTRA_2 ; Very important for this to work
  WeaponSpeed = 99999.0             
  DelayBetweenShots = 0              
  ClipSize = 1                        
  ClipReloadTime = 0                  
  AutoReloadsClip = No 
End
Add this module to the unit

Code:
Behavior = CreateObjectDie ModuleTag_99
  DeathTypes = EXTRA_2 
  CreationList = OCL_NewUnit 
  TransferPreviousHealth = Yes ; to transfer health
End
Make sure dying by deathtype EXTRA_2 has no visual or sound effects

Code:
Behavior = SlowDeathBehavior  ModuleTag_98
  DeathTypes = NONE +EXTRA_2
End
The new unit OCL

Code:
ObjectCreationList OCL_NewUnit
  CreateObject
    ObjectNames = NewUnit
    Offset      = X:0.0 Y:0.0 Z:0.0
    Count       = 1
    Disposition = LIKE_EXISTING ; to make it seem like unit changes
    InheritsVeterancy = Yes ; so as veterancy is transfered
  End
Lastly, make sure your unit's commandset has this button..

Code:
CommandButton Command_DeployUnit
  Command           = FIRE_WEAPON 
  WeaponSlot        = PRIMARY ; Best if this matches up with an AutoChoose listing that forbids this slot normally
  Options           = OK_FOR_MULTI_SELECT
  TextLabel         = CONTROLBAR:whatever
  ButtonImage       = whatever
  ButtonBorderType  = ACTION
End
NOTES:

The energy transfered from the old unit is the energy the unit had just before the last shot that killed it.

Side Effects: there are two,

1. this method actually transfers the old unit's DAMAGE, not its health, if both the old and the new unit have the same max energy this is fine, however if for instance the new unit has more max energy then the old, the unit will gain energy after it changes.

Solution: Set both units to the same max energy, if you want to make one weaker (for example half the energy of the other) create a special armour for the weaker one which has double the percentages of the other's armour.

2. When a unit is 'deployed' or 'changed' it will be counted as a unit loss.

Improvements:

If you are a good coder you can modify this code to create all sorts of interesting features, for example you could modify this code so that a unit changes in upgrade form rather then an instant button press, simply create an OCL upgrade which OCLs a weapon with the EXTRA_2 deathtype, it would be wise to make the radius damage as small as possible though so that it effects only the right unit.
Waraddict is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ground Under Buildings AntiSocialKindaGuy Generals & Zero Hour Editing 8 03-04-2008 07:36 AM
Flight Formation Lord Arkaine LOTR: Battle For Middle Earth I & II Editing 6 01-13-2005 03:32 PM
how A10ThunderboltVulcan has FX on Ground?? Plasma Generals & Zero Hour Editing 4 01-03-2005 10:11 PM
[Flare] on the ground? DysproS Red Alert 2 & Yuri's Revenge Editing 22 08-17-2004 07:13 AM
Air-to-Ground Missles? juLLe Generals & Zero Hour Editing 9 08-07-2004 09:50 PM


All times are GMT -4. The time now is 08:51 AM.


Design By: Miner Skinz.com
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.