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,885

Administrators:
DeeZire, Redemption

There are currently 12 users online.
Partner Links

Free Credit Repair

Learn the Ticket Broker Secrets
Advertisements


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

Reply
 
LinkBack Thread Tools
Old 10-31-2004, 09:51 PM   #1 (permalink)
Senior Member
 
Join Date: Jul 2003
Location: Germany
Posts: 303
Default Combat Bike Logic

Hey there,

I am currently having problems coding a deploying unit. I want it to be deployed upon command (and click) and undeployed by the same way.

I am using the Combat Bike Logic at the moment, but I can't get around the problem that the switching of the fake riders would not work correctly.

The funny thing is, the Locomotor can be changed as often as I want, but the weapon won't change when the rider changes. So it's not flawless at the moment.

Does anyone know how to perfectly code a deploying (or even just Locomotor changing) unit? I'd really appreciate any help to get past those Locomotor upgrade restrictions given by the normal upgrade.

Thanks in advance, yours HEXman

P.S.: Some code...

This shows the weaponsets changed by the different riders:

Code:
  WeaponSet
    Conditions          = WEAPON_RIDER1
    Weapon              = PRIMARY NONE
    AutoChooseSources   = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
  End
  WeaponSet
    Conditions          = WEAPON_RIDER2
    Weapon              = PRIMARY CWCruRT21Weapon
    AutoChooseSources   = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
  End
This is the locomotor changing:

Code:
  Locomotor = SET_NORMAL CWCruRT21NormalLocomotor
  Locomotor = SET_SLUGGISH None
The RiderChangeContain part:

Code:
  Behavior = RiderChangeContain ModuleTag_16
    ;A list of each valid rider that is allowed to ride this object. Each rider is
    ;assigned a modelcondition state, a weaponset flag, an object status bit, and
    ;a commandset override. The actual object is hidden inside the container so the
    ;visible rider is fluff. Also riders are deleted (not killed) when the bike is
    ;destroyed, so all deaths must be OCLs on the bike.
    Rider1 = CWCruRT21NormalPilot         RIDER1 WEAPON_RIDER1 STATUS_RIDER1 CWCruRT21NormalCommandSet SET_NORMAL
    Rider2 = CWCruRT21DeployedPilot          RIDER2 WEAPON_RIDER2 STATUS_RIDER2 CWCruRT21DeployedCommandSet SET_SLUGGISH
    ScuttleDelay          = 1500
    ScuttleStatus         = TOPPLED

    ;Standard TransportContain stuff
    Slots                 = 1
    InitialPayload        = CWCruRT21NormalPilot 1
    ScatterNearbyOnExit   = No
    HealthRegen%PerSec    = 0
    DamagePercentToUnits  = 100%  ; This module will Delete the rider on death, but we need to kill him as well so he doesn't pick up the bike's salvage crate.
    BurnedDeathToUnits    = No    ; And no Burned death.
    AllowInsideKindOf     = INFANTRY
    ExitDelay         = 250
    NumberOfExitPaths = 1 ; Defaults to 1.  Set 0 to not use ExitStart/ExitEnd, set higher than 1 to use ExitStart01-nn/ExitEnd01-nn
    GoAggressiveOnExit = Yes ; AI Will tell people to set their mood to Aggressive on exiting
    DoorOpenTime = 0
  End
All that is changed by a specialpower and OCL's using fake riders.
2312222 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-01-2004, 12:02 AM   #2 (permalink)
Senior Member
 
Join Date: May 2004
Location: My Secret Volcano Lair (USA)
Posts: 702
Send a message via AIM to Silent_Killa Send a message via MSN to Silent_Killa
Default

ummm... maybe try a dummy weapon instead of just having none?
Silent_Killa is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-01-2004, 01:11 AM   #3 (permalink)
Senior Member
 
Join Date: Apr 2003
Location: Canada
Posts: 968
Send a message via MSN to Eradicator
Default

What exactly is not working? You'll need to post the problem to get help on it. Also may need to post the command button code that produces the dummy rider incase whatever the problem is it resides there.
Eradicator is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-01-2004, 02:17 AM   #4 (permalink)
Senior Member
 
Join Date: May 2004
Location: My Secret Volcano Lair (USA)
Posts: 702
Send a message via AIM to Silent_Killa Send a message via MSN to Silent_Killa
Default

I think the problem is that the weapon isn't switching... that is if I read it correctly...
Silent_Killa is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-01-2004, 05:10 AM   #5 (permalink)
Senior Member
 
Join Date: Jul 2003
Location: Germany
Posts: 303
Default

@Silent_Killa, this is quite a good idea, I'll try it and yes, you gave quite a good summary of my problem

And now a little description of my problem:

1. The unit is built and behaves as it should, that means it drives and it can't attack anything.

2. Now I press the button to switch to deploy mode, the weapon is activated (the ammo symbol appears) and the unit is able to fire. It can't drive anymore.

---> up to here everything is working according to plan

3. When I switch back to normal (drive) mode, the unit is able to accelerate and move BUT it still is able to fire (which is NOT intended).

4. Switching back to deployed makes it stop but this is kind of pointless when the unit is able to fire even in normal mode.

So basically the switching of the fake riders does not work continueosly.

Code:
CommandButton Command_CWCruRT21SwitchToDeploy
  Command                 = SPECIAL_POWER
  SpecialPower            = SpecialAbilityCWCruRT21SwitchToDeploy
  Options                 = NEED_SPECIAL_POWER_SCIENCE OK_FOR_MULTI_SELECT MUST_BE_STOPPED
  TextLabel               = CONTROLBAR:Evacuate
  ButtonImage             = SSEvacButton
  ButtonBorderType        = SYSTEM
  DescriptLabel           = CONTROLBAR:ToolTipEvacuate
End

CommandButton Command_CWCruRT21SwitchToNormal
  Command                 = SPECIAL_POWER
  SpecialPower            = SpecialAbilityCWCruRT21SwitchToNormal
  Options                 = NEED_SPECIAL_POWER_SCIENCE OK_FOR_MULTI_SELECT MUST_BE_STOPPED
  TextLabel               = CONTROLBAR:Evacuate
  ButtonImage             = SSEvacButton
  ButtonBorderType        = SYSTEM
  DescriptLabel           = CONTROLBAR:ToolTipEvacuate
End
My progress:

Unfortunately, the dummy weapon did not solve the problem either:

Code:
;------------------------------------------------------------------------------
Weapon CWCruRT21DeployedWeapon
  PrimaryDamage               = 750.0
  PrimaryDamageRadius         = 150.0
  SecondaryDamage             = 150.0
  SecondaryDamageRadius       = 50.0
  ScatterRadiusVsInfantry     = 20.0     ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
  PreAttackDelay              = 5000
  PreAttackType               = PER_SHOT ; Do the delay every single shot
  AttackRange                 = 5000.0
  MinimumAttackRange          = 50.0
  ;MinimumAttackRange          = 500.0
  DamageType                  = EXPLOSION
  DeathType                   = EXPLODED
  AcceptableAimDelta          = 180
  FireFX                      = FX_CWCruRT21MissileLaunch
  ProjectileObject            = CWCruRT21Missile
  ProjectileExhaust           = CWCruRT21MissileExhaust
  ProjectileDetonationFX      = FX_CWCruRT21MissileExplosion
  RadiusDamageAffects         = SELF ALLIES ENEMIES NEUTRALS NOT_SIMILAR
  FireSound                   = TomahawkWeapon
  DelayBetweenShots           = 1
  ClipSize                    = 1                   ; how many shots in a Clip (0 == infinite)
  ClipReloadTime              = 15000               ; how long to reload a Clip, msec                 ; must return to base to reload this weapon
  ShowsAmmoPips               = Yes
End

;------------------------------------------------------------------------------
Weapon CWCruRT21NormalWeapon
  PrimaryDamage               = 0.1
  PrimaryDamageRadius         = 0.1
  ;ScatterRadiusVsInfantry     = 20.0     ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
  ;PreAttackDelay              = 5000
  ;PreAttackType               = PER_SHOT ; Do the delay every single shot
  AttackRange                 = 0.1
  ;MinimumAttackRange          = 50.0
  ;MinimumAttackRange          = 500.0
  DamageType                  = EXPLOSION
  DeathType                   = EXPLODED
  AcceptableAimDelta          = 180
  ;FireFX                      = FX_CWCruRT21MissileLaunch
  ;ProjectileObject            = CWCruRT21Missile
  ;ProjectileExhaust           = CWCruRT21MissileExhaust
  ;ProjectileDetonationFX      = FX_CWCruRT21MissileExplosion
  RadiusDamageAffects         = SELF ALLIES ENEMIES NEUTRALS NOT_SIMILAR
  ;FireSound                   = TomahawkWeapon
  DelayBetweenShots           = 1
  ClipSize                    = 0                   ; how many shots in a Clip (0 == infinite)
  ;ClipReloadTime              = 15000               ; how long to reload a Clip, msec                 ; must return to base to reload this weapon
  ShowsAmmoPips               = No
End
2312222 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-01-2004, 08:51 AM   #6 (permalink)
Senior Member
 
Join Date: Dec 2002
Posts: 1,031
Send a message via ICQ to Phoib Send a message via MSN to Phoib
Default

Hmm... You could try to evacuate the driver trough the normal button and look what's coming out of it.
Phoib is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-01-2004, 08:54 AM   #7 (permalink)
Senior Member
 
Join Date: Jul 2003
Location: Germany
Posts: 303
Default

That's a good point and the way I am already doing it now after some further research. I am using OCL's to spawn the fake rider not INSIDE but outside the object. I tried to give it a the PilotFindVehicle update but I forgot that this does not work for player controlled pilots, so I am still stuck here
2312222 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-01-2004, 08:55 AM   #8 (permalink)
Senior Member
 
Join Date: Dec 2002
Posts: 1,031
Send a message via ICQ to Phoib Send a message via MSN to Phoib
Default

Make it a crate somehow?

Expand the collision update?
Phoib is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-01-2004, 09:00 AM   #9 (permalink)
Senior Member
 
Join Date: Jul 2003
Location: Germany
Posts: 303
Default

That crate seems to be a nice idea...

Do you mind having a little chat on msn? I added you to my buddy list already.
2312222 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-01-2004, 03:22 PM   #10 (permalink)
Senior Member
 
Join Date: Jul 2004
Location: London, UK
Posts: 376
Send a message via MSN to AntiSocialKindaGuy
Default

I recall trying to do this exact same thing. The main problem I encountered was I couldn't find a way of removing the dummy rider without killing the host (in this case, the deploying unit).

The best workaround I have atm is the replaceobject, but its a bit crap.
AntiSocialKindaGuy 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
Bike Logic Skycrane AntiSocialKindaGuy Generals & Zero Hour Editing 9 08-01-2006 05:53 PM
Bike logic code... juLLe Generals & Zero Hour Editing 1 11-04-2004 03:49 PM
How can I do combat drop for my infantry? FleetCommand Generals & Zero Hour Editing 5 10-09-2004 10:47 AM
Other units on Combat-Cycles F-15Eagles Generals & Zero Hour Editing 1 02-08-2004 02:20 AM
Air To Air Combat OneWingedAngel Red Alert 2 & Yuri's Revenge Editing 10 01-31-2003 10:14 AM


All times are GMT -4. The time now is 03:17 AM.


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