Показать все 15 сообщений этой темы на одной странице |
HLFX.Ru Forum (https://hlfx.ru/forum/index.php)
- XashXT (https://hlfx.ru/forum/forumdisplay.php?forumid=30)
-- Making thirdperson as default (https://hlfx.ru/forum/showthread.php?threadid=4370)
Making thirdperson as default
Hey guys. I'm new here. I just got my hands on Xash and it's nice. I'm planning in modding using Xash on a sample game for myself as a hobby.
Now for the problem: I wanted to make the sample game third person and i know that the 'thirdperson' console command is for that. It's nice but I know I need to tweak it. Now, how do I put the thirdperson as default whenever I run my mod?
I saw one called Macky's Adventure that uses autoexec.cfg with the cvars, but when I run Macky's on xash, it doesn't go thirdperson, so you have to type the 'thirdperson' command by yourself in-game.
Again, good job to you guys for making this engine and this toolkit!
__________________
CRxTRDude
-----------------------
Nikki Shore blog / XashXT Cookbook (CSM)
CRxTRDude add to same place in config.cfg:
thirdperson
It's a simple way. You also can change that in client-side code.
Добавлено 21-04-2014 в 13:55:
Кому-нибудь нужен тутог на переключение лица по нажатию на клавишу?
__________________
-Brain is dead-
Tried that, but config.cfg always resets when using.
__________________
CRxTRDude
-----------------------
Nikki Shore blog / XashXT Cookbook (CSM)
CRxTRDude ok, use userconfig.cfg . I can make tutorial about client-side thirdperson, but i only change view on key pressed. But, this code simply to change to keep thirdperson forever. But, then we need to dopilit' thirdperson view for many usability in game.
__________________
-Brain is dead-
Thanks KiQ!
I got the thing working now, but then I need to tilt the view, are there cvar equivalent in xashxt to the 'cam_' cvars such as cam_idealdist, cam_idealpitch and cam_idealyaw?
I'm eventually implementing the camera system first before continuing the mod. I want to look at the inner working of the tools before doing anything.
__________________
CRxTRDude
-----------------------
Nikki Shore blog / XashXT Cookbook (CSM)
Work with variables scr_ofsx, scr_ofsy, scr_ofsz.
Is there an official list of cvars to use for xashxt for reference? I'm just curious if there is such documentation for cvars for developers.
BTW, thanks master07! I'll try this out.
__________________
CRxTRDude
-----------------------
Nikki Shore blog / XashXT Cookbook (CSM)
I'll keep that in mind tolerance. Thanks guys!
__________________
CRxTRDude
-----------------------
Nikki Shore blog / XashXT Cookbook (CSM)
So, Xash still uses old shitty HL 3rd person code? (>_> ) Whatever.
CRxTRDude there are plenty of places where you can set CVar to desired value: during creation (CVAR_CREATE() or whatever it is in cl dll -- best way), during initialization (CHud), during execution (valve.rc, autoexec.cfg, other CFGs)... just keep in mind where the value was set, so you won't spend hours finding out later.
__________________
Минутка полезного:
Бесплатный UT-подобный Half-Life mod.
Бесплатный редактор для 32-битных текстур. Без дотнета.
Бесплатный IDE для любых компиляторов и ЯП.
Бесплатная Windows-подобная ОС.
Проверка грамматики русского языка.
Чат по hl[fx]: [email protected]
__________________
CRxTRDude
-----------------------
Nikki Shore blog / XashXT Cookbook (CSM)
CRxTRDude there are two approaches to client camera code: the original HL code is rudimentary, and itself conflicts with R_Calc*RefDef() code. I took the second path - integration of camera code into V_Calc*() code.
WARNING: I think this code isn't HL-compatible... I don't remember If Xash uses that old code, the task of porting this new approach back into HL requires better than average coding skills IMHO.
1 | void V_Init(void) |
2 | { |
3 | ADD_DOMMAND("centerview", V_StartPitchDrift); |
4 | ADD_DOMMAND("thirdperson", CMD_ThirdPerson); |
5 | ADD_DOMMAND("firstperson", CMD_FirstPerson); |
6 | ... |
7 | } |
1 | void CMD_ThirdPerson(void) |
2 | { |
3 | if (CL_IsThirdPersonAllowed()) |
4 | gHUD.m_iCameraMode = CAM_MODE_LOCKED; |
5 | } |
6 |
7 | void CMD_FirstPerson(void) |
8 | { |
9 | gHUD.m_iCameraMode = CAM_MODE_OFF; |
10 | } |
__________________
Минутка полезного:
Бесплатный UT-подобный Half-Life mod.
Бесплатный редактор для 32-битных текстур. Без дотнета.
Бесплатный IDE для любых компиляторов и ЯП.
Бесплатная Windows-подобная ОС.
Проверка грамматики русского языка.
Чат по hl[fx]: [email protected]
I did that ~ X ~ through the hud.cpp declaring it to CHud::Init and it works! Thanks. The problem now is incorporating camera adjustments in the dll. BTW, I've been using the xashxt code, not the Half-Life SDK, just to let you know.
I've been meaning also to ask btw, what's bad about the 3rd person code in the original hl SDK? I'm just curious.
__________________
CRxTRDude
-----------------------
Nikki Shore blog / XashXT Cookbook (CSM)
__________________
Минутка полезного:
Бесплатный UT-подобный Half-Life mod.
Бесплатный редактор для 32-битных текстур. Без дотнета.
Бесплатный IDE для любых компиляторов и ЯП.
Бесплатная Windows-подобная ОС.
Проверка грамматики русского языка.
Чат по hl[fx]: [email protected]
~ X ~ Okay then, I want to use the XHLDM 3rd person camera, where do i start to get it from the source code? (and if it's okay with you if I use it?) You can PM me instead if you want. And thanks guys for helping!
__________________
CRxTRDude
-----------------------
Nikki Shore blog / XashXT Cookbook (CSM)
Временная зона GMT. Текущее время 12:57. | Показать все 15 сообщений этой темы на одной странице |
На основе vBulletin версии 2.3.0
Авторское право © Jelsoft Enterprises Limited 2000 - 2002.
Дизайн и программирование: Crystice Softworks © 2005 - 2024