Page 1 of 1
Vehicle zoom optics
Posted: Sun Aug 04, 2013 11:32 pm
by Vilespring
Is it possible for vehicles to have zoom optics?
This is something that some people would want to know for their mods. This is my first tutorial, so tell me what I could do better.
The answer is this code;
ObjectTemplate.vehicleFov
This code is entered when a PCO is defined.
By default, this code is set to zero.
As odd as it sounds, 0 is the same zoom as 1, so the default zoom is similar to 1.
Any number smaller than 1 will increase magnification, anything bigger will decrease it. I have some examples what this code can do.
in this first pic, you can barely see the burned wreck of a sherman tank.
![zoom optic 1.JPG (45.95 KiB) Viewed 20847 times FOV set to 0.2](./download/file.php?id=203&t=1&sid=3b41ca417840bd33c49a1b6aa90f080a)
- FOV set to 0.2
in this pic, you see how far away I am. Kinda funny in an evil way.
![zoom optic 2.JPG (58.63 KiB) Viewed 20847 times FOV set to 0 or 1](./download/file.php?id=204&t=1&sid=3b41ca417840bd33c49a1b6aa90f080a)
- FOV set to 0 or 1
Re: Vehicle zoom optics
Posted: Tue Aug 06, 2013 12:49 am
by Swaffy
I wish there was a way to toggle it, if that's what you're talking about. Perhaps we can add some kind of bundle to the vehicle with a toggle code such as "ObjectTemplate.setActivater PIMenuSelect1" and has the zoomFOV code in it. Maybe. I can only make hypotheses as of now. I would definitely be excited for something like this if a way was found. I am currently using the code for my scoped MG42 on El Alamein, but it's a permanent zoom and is non-togglable.
I got the idea from my Jet Pack with a togglable engine:
ObjectTemplate.create ActiveKitPart JetPack
ObjectTemplate.geometry GermanElite_rocketpack
ObjectTemplate.setBoneName backpack
ObjectTemplate.setCopyLinksCount 0
ObjectTemplate.setActiveAcceleration 0/30/0
ObjectTemplate.setPassiveAcceleration 0/8/0
rem ObjectTemplate.setActiveAcceleration 0/72/0
rem ObjectTemplate.setPassiveAcceleration 0/8/0
ObjectTemplate.setInAirAnimOverride GrenadeAxisFire
ObjectTemplate.burstFrequency 100
ObjectTemplate.burstTime 100
ObjectTemplate.Damping 0.0
ObjectTemplate.setTrigger PIWalk
ObjectTemplate.setActivater PIMenuSelect1
ObjectTemplate.addToNegativeMask Climbing
ObjectTemplate.addToNegativeMask Crouching
ObjectTemplate.addToNegativeMask Swiming
ObjectTemplate.addToNegativeMask Lying
ObjectTemplate.addTemplate e_RocketPack
ObjectTemplate.addTemplate e_RocketPackDefault
ObjectTemplate.DefaultEffectTemplate e_RocketPackDefault
rem ObjectTemplate.startEffectTemplate e_RocketPackDefault
ObjectTemplate.ActiveHeatIncrement 0.001
rem ** I think PassiveHeatIncrement should be kept to 0.0 **
ObjectTemplate.PassiveHeatIncrement 0.0
ObjectTemplate.CoolingFactor 1.0
ObjectTemplate.ActiveEffectPersistancePerFrame 1
ObjectTemplate.loadSoundScript Sounds/RocketPack.ssc
ObjectTemplate.setInAirAnims Lb_RocketeeringIdle Empty
ObjectTemplate.OverrideAirMovementInhibitations 1
Re: Vehicle zoom optics
Posted: Tue Aug 06, 2013 5:13 am
by Vilespring
I saw your MG 42 code on the forum, I was about to ask about it, so I searched first, then I found that. Then I played with the code for a bit, and came to these conclusions.
Also, if we change the FOV like that, wouldn't that effect ALL objects of that type on the map, or is it object-specific?
I'm liking the idea, either way.
With my sniping Panzer IV, I'm thinking of making the hull and turret separate PCOs, because it is HARD to drive with the zoom so high, all I see is the back of the tank
![Laughing :lol:](./images/smilies/icon_lol.gif)
Re: Vehicle zoom optics
Posted: Wed Aug 07, 2013 3:43 am
by Swaffy
That was my problem too, it's really hard driving around with constant EPIC ZOOM. So I stuck to using the code on stationaries that are facing towards a large field.