Tank Destroyer
10 years ago
So I was trying something out then this error happens, ReleaseCrashInfo.txt:

Release Crash at Tue Sep 22 10:57:28 2015
; Reason Uncaught Exception in GameEngine::update

Last error:
Exception is access violation
WinMain at 401700
Error code: EXCEPTION_ACCESS_VIOLATION
Description: The thread tried to read from or write to a virtual address for which it does not have the appropriate access.
Access address:00000004 was read from.

Stack Dump:
(-1) : 0x006868FE

Details:
Register dump...
Eip:006868FE Esp:0012F7AC Ebp:00000000
Eax:00000000 Ebx:03BBDA2C Ecx:00000000
Edx:00000000 Esi:131E9174 Edi:131E9188
EFlags:00210246
CS:001b SS:0023 DS:0023 ES:0023 FS:003b GS:0000
EIP bytes dump...

Bytes at CS:EIP (006868FE) : 8B 48 04 3B CD 74 05 E8 E6 B4 D9 FF 8A 88 FD 00 00 00 84 C9 75 5A 8B 5F F4 39 6B 08 74 52 8B 4F


Current stack:


More details:
I think it has something to do with my custom unit, whenever the unit is *just* about to get spawned in the airfield then the game crashes...💀

I was trying to make my custom raptor unit able to have 2 locomotors with bike logic...

Code:
;SpecialPower.ini
SpecialPower AWATD_RaptorX_HoverModeSP
  Enum              = SPECIAL_INVALID
  ReloadTime        = 3
  PublicTimer       = No
  AcademyClassify   = ACT_SUPERPOWER
End

SpecialPower AWATD_RaptorX_JetModeSP
  Enum              = SPECIAL_INVALID
  ReloadTime        = 3
  PublicTimer       = No
  AcademyClassify   = ACT_SUPERPOWER
End
;CommandButton.ini
CommandButton AWATD_RaptorX_JetMode
  Command           = SPECIAL_POWER
  SpecialPower      = AWATD_RaptorX_JetModeSP
  Options           = OK_FOR_MULTI_SELECT
  TextLabel         = CONTROLBAR:FireIonCannon
  ButtonImage       = SSParticleFire
  ButtonBorderType  = ACTION ; Identifier for the User as to what kind of button this is
  DescriptLabel     = CONTROLBAR:ToolTipFireIonCannon
End

CommandButton AWATD_RaptorX_HoverMode
  Command           = SPECIAL_POWER
  SpecialPower      = AWATD_RaptorX_HoverModeSP
  Options           = OK_FOR_MULTI_SELECT
  TextLabel         = CONTROLBAR:FireIonCannon
  ButtonImage       = SSGattling
  ButtonBorderType  = ACTION ; Identifier for the User as to what kind of button this is
  DescriptLabel     = CONTROLBAR:ToolTipFireIonCannon
End
Help please.
Currently learning how to create 3D models with GMAX so that I can make my C&C Generals Zero Hour mod even more better. 🙂
Sponsor
Zatsupachi
10 years ago
I'm curious.
How do you exactly trigger the switch from Jet to Hover?

I see you use a specialpower but.... How does it switch between the two modes.

Also.
Jets and Bike Logic don't exactly mix well... If they did, it'd be very glitchy.
"It's precision_bomber."
Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mods/death-label/downloads/death-label-ver-099 
Next Episode:
precision_bomber's Zero Hour SCIENCE!
Tank Destroyer
10 years ago
I just put the appropriate commandbuttons for the jet/hover mode. And yeah, I've already been told that bike logic with anything that lands at an airfield won't work, but I just really wanna see what exactly will happen if I try it(like, what kind of glitch will happen, or what will happen if I try it...), tho maybe if I try it with an helicopter unit? will it work fine? or not...?
Currently learning how to create 3D models with GMAX so that I can make my C&C Generals Zero Hour mod even more better. 🙂
Zatsupachi
10 years ago
Well... Helicopters work.

also-- can you give me the object code to see what's causing the error?
"It's precision_bomber."
Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mods/death-label/downloads/death-label-ver-099 
Next Episode:
precision_bomber's Zero Hour SCIENCE!
Tank Destroyer
10 years ago
Object Code:
Object AWATD_JetRaptorX

  ; *** ART Parameters ***
  SelectPortrait         = SAKingRap_
  ButtonImage            = SAKingRap
  
  UpgradeCameo1 = Upgrade_AWATDPlasmaWeapons
  UpgradeCameo2 = Upgrade_AmericaAdvancedTraining
  UpgradeCameo3 = Upgrade_AWATDEnergyArmor
  ;UpgradeCameo4 = NONE
  ;UpgradeCameo5 = NONE
  
  Draw                   = W3DModelDraw ModuleTag_01
    ExtraPublicBone = WeaponA01
    DefaultConditionState
      Model               = AVRaptorAG
      HideSubObject       = BurnerFX01 BurnerFX02
      WeaponLaunchBone = PRIMARY WeaponA
    End

    ConditionState        = JETEXHAUST
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    ConditionState        = JETEXHAUST JETAFTERBURNER
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
      ; afterburner
      ShowSubObject       = BurnerFX01 BurnerFX02
      ParticleSysBone     = Engine01 JetLenzflare
      ParticleSysBone     = Engine02 JetLenzflare
    End

    ConditionState        = REALLYDAMAGED
      Model               = av_raptor_alt
      ; damage
      ParticleSysBone     = Smoke01 JetSmoke
      ParticleSysBone     = Engine01 JetEngineDamagedSmoke
    End
    
    ConditionState        = REALLYDAMAGED JETEXHAUST
      Model               = AVRaptorAG_D
      ; damage
      ParticleSysBone     = Smoke01 JetSmoke
      ParticleSysBone     = Engine01 JetEngineDamagedSmoke
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    ConditionState        = REALLYDAMAGED JETEXHAUST JETAFTERBURNER
      Model               = AVRaptorAG_D
      ; damage
      ParticleSysBone     = Smoke01 JetSmoke
      ParticleSysBone     = Engine01 JetEngineDamagedSmoke
      ; afterburner
      ShowSubObject       = BurnerFX01 BurnerFX02
      ParticleSysBone     = Engine01 JetLenzflare
      ParticleSysBone     = Engine02 JetLenzflare
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    ConditionState        = RUBBLE
      Model               = AVRaptor_D1B
      HideSubObject       = None 
      ShowSubObject       = None
    End

    ConditionState        = RUBBLE JETEXHAUST JETAFTERBURNER
      Model               = AVRaptor_D1B
      ;HideSubObject is needed cause there're inherited from default condition state      
      HideSubObject       = None 
      ShowSubObject       = None
      ParticleSysBone     = Engine01 JetExhaust
      ParticleSysBone     = Engine02 JetExhaust
      ; exhaust
      ParticleSysBone     = Wingtip01 JetContrail
      ParticleSysBone     = Wingtip02 JetContrail
    End

    OkToChangeModelColor = Yes

  End

  ; ***DESIGN parameters ***
  DisplayName             = OBJECT:RaptorX
  EditorSorting           = VEHICLE
  Side                    = AdvancedWeaponsAndTechDivision
  TransportSlotCount      = 1 ;how many "slots" we take in a transport (0 == not transportable)
  VisionRange             = 500
  ShroudClearingRange     = 600
  Prerequisites
    Object                = AWATDAirfield
  End

  WeaponSet
    Conditions            = None 
    Weapon                = PRIMARY RaptorXLaserWeapon
	Weapon                = SECONDARY ScatterMissileLauncher
  End
  WeaponSet
    Conditions            = PLAYER_UPGRADE 
    Weapon                = PRIMARY RaptorXPlasmaWeapon
  End
  ArmorSet
    Conditions            = None
    Armor                 = Airplane_Armor
    DamageFX              = None
  End
  ArmorSet
    Conditions            = PLAYER_UPGRADE
    Armor                 = Energy
    DamageFX              = EnergyHit
  End

  BuildCost               = 3000
  BuildTime               = 20   
  ExperienceValue         = 100 150 250 300   ;Experience point value at each level
  ExperienceRequired      = 0 100 200 400   ;Experience points needed to gain each level
  IsTrainable             = Yes             ;Can gain experience
  CrusherLevel            = 1  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel          = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet              = AWATDRaptorX_JET_CommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect            = KingRaptorVoiceSelect
  VoiceMove              = RaptorVoiceMove
  VoiceAttack            = RaptorVoiceAttack
  VoiceAttackAir         = RaptorVoiceAttackAir
  VoiceGuard             = RaptorVoiceAirPatrol
  SoundAmbient           = RaptorAmbientLoop
  SoundAmbientRubble     = NoSound
  ; SoundMoveLoop          = RaptorAmbientLoop  ; don't want sound while sitting at airfield
  ; SoundAmbient           = NoSound
  UnitSpecificSounds
    VoiceCreate          = KingRaptorVoiceCreate
    SoundEject           = PilotSoundEject
    VoiceEject           = PilotVoiceEject
    Afterburner          = RaptorAfterburner
    VoiceLowFuel         = RaptorVoiceLowFuel
    VoiceGarrison        = RaptorVoiceMove
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority          = UNIT
  KindOf                 = PRELOAD CAN_CAST_REFLECTIONS CAN_ATTACK SELECTABLE VEHICLE SCORE AIRCRAFT POWERED
  Body                   = ActiveBody ModuleTag_02
    MaxHealth            = 180.0
    InitialHealth        = 180.0
  End

  Behavior               = WeaponSetUpgrade ModuleTag_03
    TriggeredBy          = Upgrade_AWATDPlasmaWeapons
  End

  Behavior               = WeaponSetUpgrade ModuleTag_30
    TriggeredBy          = Upgrade_AWATDEnergyArmor
  End               

  Behavior = TransportAIUpdate ModuleTag_27
    Turret
      TurretTurnRate = 240       ; turn rate, in degrees per sec
      NaturalTurretAngle = 0
      MinIdleScanAngle = 30      ; in degrees off the natural turret angle
      MaxIdleScanAngle = 60      ; in degrees off the natural turret angle
      MinIdleScanInterval = 5000 ; in milliseconds
      MaxIdleScanInterval = 10000 ; in milliseconds
      ControlledWeaponSlots = PRIMARY SECONDARY TERTIARY
    End
	AutoAcquireEnemiesWhenIdle    = Yes
  End
  
  Behavior = RiderChangeContain SwitchLocomotor
    Rider1 = JetMode_Unit RIDER1 WEAPON_RIDER1 STATUS_RIDER1 AWATDRaptorX_JET_CommandSet SET_NORMAL
	Rider2  = HoverMode_Unit RIDER2 WEAPON_RIDER2 STATUS_RIDER2 AWATDRaptorX_HOVER_CommandSet SET_SLUGGISH
	ScuttleDelay          = 1000
	ScuttleStatus         = TOPPLED
	Slots                 = 1
    InitialPayload        = JetMode_Unit 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     = 0 ; 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
  
  Behavior = ExperienceScalarUpgrade ModuleTag_04
    TriggeredBy = Upgrade_AmericaAdvancedTraining
    AddXPScalar = 1.0 ;Increases experience gained by an additional 100%
  End

  Behavior                          = JetSlowDeathBehavior ModuleTag_05
    FXOnGroundDeath                 = FX_JetOnGroundDeath
    OCLOnGroundDeath                = OCL_RaptorDeathFinalBlowUp
    DestructionDelay                = 99999999; destruction will happen when we
    RollRate                        = 0.2
    RollRateDelta                   = 100% ;each frame, rollrate = rollrate * rollrateDelta
    PitchRate                       = 0.0
    FallHowFast                     = 110.0%  ;Bigger is faster (can be over 100%,it's a fraction of gravity)
    FXInitialDeath                  = FX_RaptorDeathInitial
    OCLInitialDeath                 eath  = 500  ; in milliseconds
    FXSecondary                     = FX_JetDeathSecondary
    OCLSecondary                    = OCL_RaptorDeathSecondary
    FXHitGround                     = FX_JetDeathHitGround
    OCLHitGround                    = OCL_RaptorDeathHitGround
    DelayFinalBlowUpFromHitGround   = 200 ; in milliseconds
    FXFinalBlowUp                   = FX_JetDeathFinalBlowUp
    OCLFinalBlowUp                  = OCL_RaptorDeathFinalBlowUp
;   DeathLoopSound                  = MICAL NEEDS TO MAKE ME
  End
  Behavior                    = EjectPilotDie ModuleTag_06
    ExemptStatus         = HIJACKED
    GroundCreationList = OCL_EjectPilotOnGround
    AirCreationList = OCL_EjectPilotViaParachute
    VeterancyLevels =  ALL -REGULAR ;only vet+ gives pilot
  End
  
  Behavior               = PhysicsBehavior ModuleTag_07
    Mass                 = 500.0
  End

  Behavior                 = TransitionDamageFX ModuleTag_08
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes Psys:SmokeSmallContinuous01
    ReallyDamagedFXList1         = Loc: X:0 Y:0 Z:0 FXList:FX_MIGDamageTransition
  End

  Behavior = JetAIUpdate ModuleTag_09
    OutOfAmmoDamagePerSecond  = 10%  ; amount of damage to take per SEC (not per frame) when out of ammo
                                    ; note that it's expressed as a percent of max health, not an absolute
    TakeoffDistForMaxLift     = 0%   ; larger numbers give more lift sooner when taking off
    TakeoffPause              = 500
    MinHeight                 = 5
    ParkingOffset             = 3             ; scooch it a little forward so the tail doesn't hit the doors
    ReturnToBaseIdleTime      = 10000         ; if idle for this long, return to base, even if not out of ammo
  End
  
  Locomotor = SET_NORMAL RaptorX_JetLocomotor
  Locomotor = SET_SLUGGISH RaptorX_HoverLocomotor
  Locomotor = SET_TAXIING BasicJetTaxiLocomotor

  Behavior = OCLSpecialPower JM
    SpecialPowerTemplate = AWATD_RaptorX_JetMode
	OCL  = SpawnUnitLoad_1
	CreateLocation = CREATE_AT_LOCATION
  End
  
  Behavior = OCLSpecialPower HM
    SpecialPowerTemplate = AWATD_RaptorX_HoverMode
	OCL  = SpawnUnitLoad_2
	CreateLocation = CREATE_AT_LOCATION
  End
  
  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
    AflameDamageAmount = 3       ; taking this much damage...
    AflameDamageDelay = 500       ; this often.
  End
  Behavior = PointDefenseLaserUpdate ModuleTag_22
    WeaponTemplate        = AirF_RaptorPointDefenseLaser
    PrimaryTargetTypes    = BALLISTIC_MISSILE SMALL_MISSILE
    ScanRate              = 10
    ScanRange             = 200.0
    PredictTargetVelocityFactor = 2.0
  End
  Behavior = StealthDetectorUpdate ModuleTag_24
    DetectionRate   = 500   ; how often to rescan for stealthed things in my sight (msec)
    ;DetectionRange = 250 ;Dustin, enable this for independant balancing!
    CanDetectWhileGarrisoned  = No ;Garrisoned means being in a structure that you units can shoot out of.
    CanDetectWhileContained   = No ;Contained means being in a transport or tunnel network.
  End
  Behavior = StealthUpdate ModuleTag_27
    StealthDelay                          = 1000 ; msec
    StealthForbiddenConditions            = FIRING_PRIMARY
    ; not currently used... but maybe someday? (srj)
    ;RevealDistanceFromTarget             = 0.0f
    FriendlyOpacityMin                    = 50.0%
    FriendlyOpacityMax                    = 100.0%
    InnateStealth                         = Yes
    OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End

  Behavior = PointDefenseLaserUpdate ModuleTag_Laser_One
    WeaponTemplate        = AirF_PointDefenseLaser
    PrimaryTargetTypes    = BALLISTIC_MISSILE SMALL_MISSILE
    ScanRate              = 0
    ScanRange             = 300.0
    PredictTargetVelocityFactor = 1.0
  End

  Behavior                = ArmorUpgrade ModuleTag_Armor25
    TriggeredBy           = Upgrade_AWATDEnergyArmor
  End

  Geometry                 = Box
  GeometryIsSmall          = Yes
  GeometryMajorRadius      = 14.0
  GeometryMinorRadius      = 7.0
  GeometryHeight           = 5.0
  Shadow                   = SHADOW_VOLUME
  ShadowSizeX = 89  ; minimum elevation angle above horizon. Used to limit shadow length.

End

Currently learning how to create 3D models with GMAX so that I can make my C&C Generals Zero Hour mod even more better. 🙂
Zatsupachi
10 years ago
Okay... It looks like you have 2 AIUpdates--which is bad-- I think. Hence, why Jets with Bike Logic are buggy...

You can try running it in WorldBuilder-- see if they editor complains.
"It's precision_bomber."
Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mods/death-label/downloads/death-label-ver-099 
Next Episode:
precision_bomber's Zero Hour SCIENCE!
Tank Destroyer
10 years ago
I found out the problem, I misspelled the specialpower names 😮, maybe that's why it kept crashing the game...


Currently learning how to create 3D models with GMAX so that I can make my C&C Generals Zero Hour mod even more better. 🙂
Tank Destroyer
10 years ago
Woah, now I think I get what you mean by "buggy" 😞. Whenever I set the jet to hover mode(helicopter locomotor) it works fine but when I order it to attack then the locomotor becomes the default one(the jet locomotor) 😨
Currently learning how to create 3D models with GMAX so that I can make my C&C Generals Zero Hour mod even more better. 🙂
V
  • V
  • 50.25% (Neutral)
  • Captain
10 years ago

Woah, now I think I get what you mean by "buggy" 😞. Whenever I set the jet to hover mode(helicopter locomotor) it works fine but when I order it to attack then the locomotor becomes the default one(the jet locomotor) D:

Originally Posted by: Tank Destroyer 



That might be because (I think) Jet units normally switch to a second locomotor when attacking.

  
;From the Raptor code
  Locomotor = SET_NORMAL RaptorJetLocomotor
  Locomotor = SET_TAXIING BasicJetTaxiLocomotor

Maybe I'm wrong, but I think the "TAXIIING" locomotor is the one it switches too when attacking.

So I say try getting rid of the TAXIING locomotor and see how that works.
The mind is quicker than the eye.