OSP Code QoL [WB] Ironsight mode

Users who are viewing this thread

Specialist

Master Knight
WB
DJK83 said:
Okay, I just tested it with one, but there were a few problems. First, I'm confused when it comes to the part about adding "whatever you use to zoom". How exactly do you do that? Without doing anything in that regard, it stayed zoomed in permanently. So how do I get that to work properly? Second, the model is gonna need to be moved over and re-arranged a bit so that it's lined up properly. Can that be done with the X Y and Z coordinates that are in the code?
That is the key you want to use, EG - Key_x instead of key_whatever_you_use_to_zoom
It does? That's odd
That bit of code is only the viewpoint placement. You can change it to move where the model is on the screen
 

DJK83

Sergeant
I'm still confused about the zoom key. How exactly should that be set up? What should it look like?
 

Willhelm

Knight at Arms
I've got the script to work for NWs how ever when you crouch the view point is still in the same position and the gun is way below? How would i allow it to drop as you crouch?
 

MaHuD

Section Moderator
WBM&BNWWF&SVC
I geuss by checking if the player is in the crouched animation and then adjusting the coordinates of the mission cam accordingly.
 

Dasvi2018

Grandmaster Knight
I am planning to put it on my personal mod for NW. But I just can't understand the second part. In front of which mission do I need to put it for multiplayer?
 

Woelfie

Master Knight
M&BWBWF&SNW
Dasvi2018 said:
I am planning to put it on my personal mod for NW. But I just can't understand the second part. In front of which mission do I need to put it for multiplayer?

What are you finding difficult?

Its very simple, you'd just search for the gamemode you want (eg. multiplayer_dm) and find something along the lines of (Can't remember off the top of my head)
Code:
multiplayer_server_spawn_common,
  and then add below it
Code:
 multiplayer_ironsight_mode,

If you're struggling after that then..

Wolf.
 

Dasvi2018

Grandmaster Knight
Wolfstar said:
Dasvi2018 said:
I am planning to put it on my personal mod for NW. But I just can't understand the second part. In front of which mission do I need to put it for multiplayer?

What are you finding difficult?

Its very simple, you'd just search for the gamemode you want (eg. multiplayer_dm) and find something along the lines of (Can't remember off the top of my head)
Code:
multiplayer_server_spawn_common,
  and then add below it
Code:
 multiplayer_ironsight_mode,

If you're struggling after that then..

Wolf.

Yea but in which file is this line?
 

Orbit-

Knight at Arms
VC
Nord Champion said:
This is wonderful!!!

Thanks for this, I really appreciate the work you put into this. Also, I figured out a fix for the 3rd person head glitch thing (it may require WSE but I'm not sure)


          (game_key_is_down, gk_zoom),
 
          (set_camera_in_first_person, 1),

          (agent_get_look_position, pos1, ":player_agent"),

That doesnt seem to work for me, error "set_camera_in_first_person is not defined". Anyone can help me with this? Everything works perfectly but 3rd person is bugged because of that camera angle. I need to make it work only for 1st person mode.
 

kalarhan

Python Saint
Count
WBNWVCWF&S
Aruda said:
error "set_camera_in_first_person is not defined"

what game and which version are using for the engine (.exe) and the modsys ?

Example: Warband 1.172 with modsys 1.153 (don't confuse Native the module with Warband the game engine. If you play Floris mod, that is still using Warband engine)

check your header_operations.py and why the operation is not listed there
 

Orbit-

Knight at Arms
VC
latest version of Warband with 1.158 modsys.


set_camera_in_first_person  is not in header operations for some reason, tried adding it manually to header ops. didnt work. What should i do?
 

kalarhan

Python Saint
Count
WBNWVCWF&S
Aruda said:
latest version of Warband with 1.158 modsys.

set_camera_in_first_person  is not in header operations for some reason, tried adding it manually to header ops. didnt work. What should i do?

if you are using Warband 1.170+ (latest), then all you need to do is add it to your header_operations.py. The operation was included for a VC update, that is why it is more recent (newer than version 1.158 you have). It works on any Warband module (if you use the latest .exe).

Code:
is_camera_in_first_person                    = 61    # (is_camera_in_first_person),
set_camera_in_first_person                   = 62    # (set_camera_in_first_person, <value>), 
                                                     # 1 = first, 0 = third person
 

Orbit-

Knight at Arms
VC
kalarhan said:
Aruda said:
latest version of Warband with 1.158 modsys.

set_camera_in_first_person  is not in header operations for some reason, tried adding it manually to header ops. didnt work. What should i do?

if you are using Warband 1.170+ (latest), then all you need to do is add it to your header_operations.py. The operation was included for a VC update, that is why it is more recent (newer than version 1.158 you have). It works on any Warband module (if you use the latest .exe).

Code:
is_camera_in_first_person                    = 61    # (is_camera_in_first_person),
set_camera_in_first_person                   = 62    # (set_camera_in_first_person, <value>), 
                                                     # 1 = first, 0 = third person

Oh thank you very much!
 

Bisoso1893

Recruit
Oh thank you very much!
Soooooo, all I need to do is to:


1. Open header_operations.py

2.Add:

"
is_camera_in_first_person = 61 # (is_camera_in_first_person),
set_camera_in_first_person = 62 # (set_camera_in_first_person, <value>),
# 1 = first, 0 = third person
"
3.Save

4.Obtain the corresponding TXT file

... and that's all ? Just play ?
 
Soooooo, all I need to do is to:


1. Open header_operations.py

2.Add:

"
is_camera_in_first_person = 61 # (is_camera_in_first_person),
set_camera_in_first_person = 62 # (set_camera_in_first_person, <value>),
# 1 = first, 0 = third person
"
3.Save

4.Obtain the corresponding TXT file

... and that's all ? Just play ?
That is wrong. You better learn the basics of scripting and then do what Earendil said.
 
Top Bottom