Duke4.net Forums: Zoom alias - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Zoom alias

User is offline   Morgаn 

#1

Is it possible to create typical +zoom -zoom alias in eduke32 and bind it to mouse button? This is must-have thing for me in Quake and Doom source ports, but I can't make it work in eduke32, it's like only works on +zoom.
0

User is offline   jimbob 

#2

i have used zoom in, and zoom out, setaspect 131072 yxaspect for a zoomed out effect ( technically you increase the FOV with 65536 being the default 90 so its 90 degrees but twice :P ) and lower values zoom in
0

User is offline   Morgаn 

#3

View Postjimbob, on 09 May 2021 - 11:49 PM, said:

i have used zoom in, and zoom out, setaspect 131072 yxaspect for a zoomed out effect ( technically you increase the FOV with 65536 being the default 90 so its 90 degrees but twice :P ) and lower values zoom in

I'm kinda confused now. What exactly I should write for alias string, so it would just work as zoom toggle with bind <alias> mouse2 and fov 52.5 on zoom in and fov 105 on zoom out?

This post has been edited by Morgаn: 10 May 2021 - 02:43 AM

0

User is offline   jimbob 

#4

you set your mouse to a specific function that is redundant, like turnaround, then use
onevent EVENT_TURNAROUND { setaspect 32768 } endevent

32768 is half of 65536 so zoomed in 2X, 16384 is double zoom, or 4X it also works the other way around, usse values higher than 65536 to zoom out

you can use aditional programming to change the description of turnaround to zoom too

using
definegamefuncname 36 Zoom

place that in your game.con and you're all set
0

User is offline   Morgаn 

#5

Holy crap... Now I see why even simplest Build engine modding are such a pain in the ass with all those GRP tinkering, scripts compiling and spaghetti code. Not even talking about different mods, including gameplay mods, combined. Thanks tho.

P.S. Is there a way to just change extracted CON files for mods without getting compiling error? If not, I think I gave up to mess with Build games ever again :D

This post has been edited by Morgаn: 11 May 2021 - 01:41 AM

0

User is online   Danukem 

  • Duke Plus Developer

#6

You can literally just paste those two lines he gave you at the top of any CON file that the game uses and it will work.
0

User is offline   Morgаn 

#7

View PostDanukem, on 11 May 2021 - 01:44 AM, said:

You can literally just paste those two lines he gave you at the top of any CON file that the game uses and it will work.

Unfortunately it crashes with "error compiling CON file"
0

User is online   Danukem 

  • Duke Plus Developer

#8

View PostMorgŠ°n, on 11 May 2021 - 04:18 AM, said:

Unfortunately it crashes with "error compiling CON file"


Oh I see. Setaspect takes 2 parameters, not 1. He left out one of the numbers. Also, even without that error, setaspect only works during display events. And, there has to be a way to restore the normal view aspect when it is toggled off. I wasn't reading carefully and just assumed he was giving you working code since that's what is sounded like. I have a working version of this in my mods but I don't have time to port it out at the moment.

https://wiki.eduke32.../wiki/Setaspect
0

User is offline   Morgаn 

#9

View PostDanukem, on 11 May 2021 - 02:05 PM, said:

Oh I see. Setaspect takes 2 parameters, not 1. He left out one of the numbers. Also, even without that error, setaspect only works during display events. And, there has to be a way to restore the normal view aspect when it is toggled off. I wasn't reading carefully and just assumed he was giving you working code since that's what is sounded like. I have a working version of this in my mods but I don't have time to port it out at the moment.

https://wiki.eduke32.../wiki/Setaspect

What about way that used for ironsights and scopes in eduke mods? It have to be applied for every weapon as mod once again?
0

User is online   Danukem 

  • Duke Plus Developer

#10

Its going to be a "mod" in the sense that it requires modified script code to work. But it can be made general purpose for any weapon and can be one chunk of code pasted into any script file. If I get some time I could do it, but I've been super busy lately.
0

User is offline   Morgаn 

#11

View PostDanukem, on 12 May 2021 - 06:00 PM, said:

Its going to be a "mod" in the sense that it requires modified script code to work. But it can be made general purpose for any weapon and can be one chunk of code pasted into any script file. If I get some time I could do it, but I've been super busy lately.

I'm not really familiar with ports and mods authors, but I enjoyed Duke Plus and Alien Armageddon with eduke32. So, if you're somehow related to development, I'll probably just leave a suggestion to add bindable zoom feature in future updates for eduke32 or/with help of those mods.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options