Page 1 of 1

Vehicle zoom optics

PostPosted: 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. :D
The answer is this code;
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

in this pic, you see how far away I am. Kinda funny in an evil way. :lol:
FOV set to 0 or 1

Re: Vehicle zoom optics

PostPosted: 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

PostPosted: 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 :lol:

Re: Vehicle zoom optics

PostPosted: 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.