Vehicle zoom optics

If you know something thats not in here please share it
Post Reply
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Vehicle zoom optics

Post 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. :D
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.
FOV set to 0.2
FOV set to 0.2
in this pic, you see how far away I am. Kinda funny in an evil way. :lol:
FOV set to 0 or 1
FOV set to 0 or 1
Last edited by Vilespring on Sat Aug 17, 2013 6:41 pm, edited 1 time in total.
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Vehicle zoom optics

Post 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
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Vehicle zoom optics

Post 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 :lol:
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Vehicle zoom optics

Post 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.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Post Reply