rogi
10-25-2004, 11:37 PM
i tried searching the forums, but couldn't find anyone posting how to set up so your weapons have default zoom, ie in cg your zoom is auto 2, with sniper its 10, etc........can anyone help me here.
weapon zoomrogi 10-25-2004, 11:37 PM i tried searching the forums, but couldn't find anyone posting how to set up so your weapons have default zoom, ie in cg your zoom is auto 2, with sniper its 10, etc........can anyone help me here. Krage 10-26-2004, 12:09 PM I don't think its possible to have it directly weapon specific unless you use keys bound to select certain weapons, these could switch your zoom to a particular value as you selected them. You could also switch to a certain zoom level by weapon slot (1,2,3) if you use slot keys (the default) for changing weaps but it wouldn't change depending on the weapon in that slot, just always be something like slot 1: 5x, slot 2: 2x, etc. For the slot method just go into your user.ini and find the lines that look like: 1=SwitchWeapon 1 | SwitchVehiclePosition 1 2=SwitchWeapon 2 | SwitchVehiclePosition 2 3=SwitchWeapon 3 | SwitchVehiclePosition 3 and change them to 1=SwitchWeapon 1 | SwitchVehiclePosition 1 | set PlayerCharacterContrller zoomLevel 0 2=SwitchWeapon 2 | SwitchVehiclePosition 2 | set PlayerCharacterContrller zoomLevel 0 3=SwitchWeapon 3 | SwitchVehiclePosition 3 | set PlayerCharacterContrller zoomLevel 0 Change the 0 to the number of the zoom level you want to use (by default 0 = 2x, 1 = 4x, 2 = 10x). For the weapon specific method I'll assume you already know the lines to look for as you'd have to have edited them in yourself so just add that same " | set PlayerCharacterContrller zoomLevel 0" string to the end of the commands and adjust zoom level to suit. rogi 10-26-2004, 10:53 PM so u're saying if someone uses mouse roller to swith weapons, it can't be done? ther'es no way to detect your weapon and change zoom? Krage 10-27-2004, 12:42 AM As far as I know you can't detect what weapon is currently being used and change anything based on that, part of the scripting restrictions i think... Kaiten Commande 10-27-2004, 09:44 AM You can get weapon names.. Just as an example which you could use in a hud: var LabelElement weaponLabel; function UpdateData(ClientSideChar acter c) { local ClientSideCharacter.HUDWe aponInfo weapon; weapon = c.activeWeapon; weaponLabel.SetText(GetWe aponName(weapon.type)); } function string GetWeaponName( class<Weapon> weaponClass) { Local String WeaponName; if ( ClassIsChildOf( weaponClass, class'Gameplay.Blaster' ) ) WeaponName= "Blaster"; else if ( ClassIsChildOf( weaponClass, class'Gameplay.Buckler' ) ) WeaponName = "Buckler"; else if ( ClassIsChildOf( weaponClass, class'Gameplay.Burner' ) ) WeaponName = "Burner"; else if ( ClassIsChildOf( weaponClass, class'Gameplay.Chaingun' ) ) WeaponName = "Chaingun"; else if ( ClassIsChildOf( weaponClass, class'Gameplay.EnergyBlad e' ) ) WeaponName = "Energy Blade"; else if ( ClassIsChildOf( weaponClass, class'Gameplay.Grappler' ) ) WeaponName = "Grappler"; else if ( ClassIsChildOf( weaponClass, class'Gameplay.GrenadeLau ncher' ) ) WeaponName = "Grenade Launcher"; else if ( ClassIsChildOf( weaponClass, class'Gameplay.Mortar' ) ) WeaponName = "Mortar"; else if ( ClassIsChildOf( weaponClass, class'Gameplay.RocketPod' ) ) WeaponName = "Rocket Pod"; else if ( ClassIsChildOf( weaponClass, class'Gameplay.SniperRifl e' ) ) WeaponName = "Sniper Rifle"; else if ( ClassIsChildOf( weaponClass, class'Gameplay.Spinfusor' ) ) WeaponName = "Spinfusor"; else WeaponName = "Unknown"; return WeaponName; } It seems a bit long winded,but it works.. There is probably a work round with GetParent, but I aint messed with it yet. MikSchultzy 10-27-2004, 04:16 PM Kaiten, I love you, yet I hate you. :| | ||