Shrike reticle

edited February 2009 in Mods and Customization
I added a modded shrike to the server.

There's an issue with the aiming reticle disappearing when you change weapon modes. The reticle disappears when you change modes and never comes back.

Comments

  • Existing code below. I think this would be the correct code, it's out of the vehicle.cs file.

    It is set but it's not working. "It no worky!" ;D
       // setup reticle for selected weapon (need this for player remount)
       %veh = %player.getObjectMount();
       if (%veh.selectedWeapon == 2)  // ck for chaingun and set reticle
       {
          %player.client.setWeaponsHudActive("Chaingun");
       }
       else if (%veh.selectedWeapon == 1) // ck for missles and set reticle
       {
          %player.client.setWeaponsHudActive("MissileLauncher");
       }
       else if (%veh.selectedWeapon == 3) // ck for bombs and set reticle
       {
          commandToClient(%client, 'startBomberSight');
       }
    
  • If it helps, weapon change has no sound either.
  • edited February 2009
    Thanks to the player who was on my server last night, you put me on the right track to fix the reticles! Sorry I forgot your name already...

    Edit:: Mruballos was the guys name.


    One last thing for this vehicle, where is the code for the vehicle weapon(s) change sound stored?

    In the vehicle_name.cs there is the following for the missiles as an example:
       stateName[0]                     = "Activate";
       stateTransitionOnTimeout[0]      = "ActivateReady";
       stateTimeoutValue[0]             = 0.5;
       stateSequence[0]                 = "Activate";
       stateSound[0]                    = MissileSwitchSound;
    
       stateName[1]                     = "ActivateReady";
       stateTransitionOnLoaded[1]       = "Ready";
       stateTransitionOnNoAmmo[1]       = "NoAmmo";
    
       stateName[2]                     = "Ready";
       stateTransitionOnNoAmmo[2]       = "NoAmmo";
       stateTransitionOnTriggerDown[2]  = "Fire";
    
       stateName[3]                     = "Fire";
       stateTransitionOnTimeout[3]      = "Reload";
       stateTimeoutValue[3]             = 0.4;
       stateFire[3]                     = true;
       stateRecoil[3]                   = LightRecoil;
       stateAllowImageChange[3]         = false;
       stateSequence[3]                 = "Fire";
       stateScript[3]                   = "onFire";
       stateSound[3]                    = MissileFireSound;
    
       stateName[4]                     = "Reload";
       stateTransitionOnNoAmmo[4]       = "NoAmmo";
       stateTransitionOnTimeout[4]      = "Ready";
    //   stateTimeoutValue[4]             = 2.5;
       stateTimeoutValue[4]             = 1.5;
       stateAllowImageChange[4]         = false;
       stateSequence[4]                 = "Reload";
       stateSound[4]                    = MissileReloadSound;
    
       stateName[5]                     = "NoAmmo";
       stateTransitionOnAmmo[5]         = "Reload";
       stateSequence[5]                 = "NoAmmo";
       stateTransitionOnTriggerDown[5]  = "DryFire";
    
       stateName[6]                     = "DryFire";
       stateSound[6]                    = MissileDryFireSound;
       stateTimeoutValue[6]             = 1.0;
       stateTransitionOnTimeout[6]      = "ActivateReady";
    

    So the code exists, but the sounds don't happen in game. It must be being superseded elsewhere. Any thoughts?
  • stateSound[#] = SoundDatablock;
    
    That controls the sounds. Also, make sure your vehicle is being exec'd AFTER weapons.cs, since it uses other sound datablocks from the missile launcher.
  • edited February 2009
    Thanks.

    It executes after weapons.cs and it's last in all the vehicles and before vehicle.cs (which has a comment that states all vehicles should be before it).

    Other sounds in the vehicle_name.cs work fine. i.e. chaingun spinup, bomb sounds (empty, drop and ready) and etc.

    Frustrating.
Sign In or Register to comment.