Forum posts

hah i noticed that in the forum comments. I actually learned a lot from your youtube videos so thank you for your efforts :P
I remember being 14 and trying to figure out this specific thing, almost a decade ago. I remember I did some stupid nonsense thing to get it to compile, and then it crashed whenever the monster looked at me. I've come a long way since and, even though this would be super easy for me now, it gives me a unique kind of satisfaction, justice almost, to see someone publish a solution. Thank you.

I sure wonder why they returned null in GetScheduleOfType, probably an SDK difference of some sort? In either case you can also edit the tutorial itself.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 5 months ago2024-08-28 13:56:50 UTC
in code modding counter strike? Post #349104
It was reverse engineered long ago. Look for regamedll.
Hey yall i thought i might share my solution to all the errors/bugs with the NPC projectile tutorial here

https://twhl.info/wiki/page/Tutorial%3A_Coding_NPCs_in_GoldSrc

I posted my solution in the comments but i might as well give yall a heads up.
since everyone has been having trouble with this and i needed to learn projectiles, i decided to work on fixing the bugs in this tutorial.
The integers that represent the animation events were not the same as what was written in the .qc for the melee attacks and reload so you had to change it to this
#define PDRONE_FIRE_SPIKE ( 1 )
#define PDRONE_MELEE_LEFT ( 2 )
#define PDRONE_MELEE_RIGHT ( 4 )
#define PDRONE_MELEE_BOTH ( 6 )
#define PDRONE_RELOAD ( 7 )
the return NULL under GetScheduleOfType was causing crashes so i changed it to:
return CBaseMonster::GetScheduleOfType(Type);
i had to make a custom checkAmmo function and override checkRangeAttack1 and explicitly call them in getSchedule.

and thats about it. heres a video preview of the changes i made and the showcasing it working. I will share the gitHub Code below so you can reference it.
PROJECTILE NPC
GITHUB FILES:
https://github.com/TylerMaster/ICE1/blob/BRANDON_SMITH_Ex1/wip_monster.cpp
https://github.com/TylerMaster/ICE1/blob/BRANDON_SMITH_Ex1/wip_monster.h
I found how to. it was "MenuHintColor" in the TrackerScheme.res file : D
User posted image
Diechie Diechiehello!
I guess you could create a flag m_fInBurst (set to false in Spawn()) that you set to true in PrimaryAttack() if m_iBurst is equal to m_iMaxBurst, and set to false if m_iBurst is zero.
If m_fInBurst is true, set m_flTimeWeaponIdle to 0.1.

Then in WeaponIdle() do something like
void CMP5::WeaponIdle()
{
    if (m_fInBurst && m_iBurst > 0)
    {
        PrimaryAttack();
        m_flTimeWeaponIdle = 0.1;
        return;
    }
    // ... rest of code
Essentially use PrimaryAttack() to start the burst fire, and let WeaponIdle() as a loop to call PrimaryAttack() until the burst count is exhausted.

Again, I'm just guessing here.
Thanks for your reply!
I tried this method and make a little change in it.Now it can fire in 3 round burst.
However,it still a little difference to what i expected.
Now it needs to press and hold mouse left button to fire 3 shots,what i really want is when i click the button,it will fire 3 shots(Just like the Glock in counter-strike).Can you help me?
Posted 5 months ago2024-08-27 11:46:30 UTC
in Everybody talking about Half-Life 3 again Post #349099
The industry only knows how to milk cows apparently.
Meerjel01 Meerjel01I want to be a Meerjel
Posted 5 months ago2024-08-27 10:01:44 UTC
in Everybody talking about Half-Life 3 again Post #349098
I hold a strong belief that Half-Life 3 will appear only once all these fading gaming hype cycles will have been completely exhausted. And yet, even then, people still find stupid ideas to cling to and develop yet the next "best thing" that will register as a small blip of a few months on the gamer's attention radar.
In recent years it feels like the gaming cycles have become more and more compressed. It's like "what's the game of the season?", and feels like it's slowly migrating to bite-sized experiences.
But unfortunately that's what I'm experiencing in my bubble only, because statistics tell us a different story.. Fortnite, Overwatch, LoL etc. have playerbases in the millions or hundreds of millions. I sometimes see kids glued to their phone playing roblox while walking.

Naturally, every major gaming company wants a piece of that pie and then go with the flow: MOBA games (this, after MMMORPGS has been milked to death), Battle Royale (does anyone even remember PUBG?) and different FPSes.... Apex Legends, Fortnite, Overwatch, lately there was a HellDivers 2 trend...

To me Deadlock is yet another game where I'd have to invest way too many resources to learn the style of each champion, strategies and skills. And for what? It's the same old shit and for me it's just a fleeting experience, something to play with my mates 2 or 3 times just to have a taste of it. There simply isn't enough time anymore if you want to have a life outside your house.

Some of us clearly are not in the audience of these companies anymore.
Striker StrikerI forgot to check the oil pressure
Hi and welcome to TWHL!
Now I haven't dabbled much in the weapons related game code so I'm sure someone else might have a better way of doing it than I.

The way I'd do it is to give new members of type int to CMP5's header; int m_iMaxBurst and m_iBurst and initialise both of these to 3 in CMP5's Spawn() method.

Then in the PrimaryAttack() method, add a decrement to m_iBurst just below the m_iClip decrement, and further down add a check for if m_iBurst is exhausted, and if it is then add a 0.5 second delay to the next fire property and reset m_iBurst to m_iMaxBurst.

At the top:
void CMP5::PrimaryAttack()
{
    // don't fire underwater
    if (m_pPlayer->pev->waterlevel == 3)
    {
        PlayEmptySound();
        m_flNextPrimaryAttack = 0.15;
        return;
    }

    if (m_iClip <= 0)
    {
        PlayEmptySound();
        m_flNextPrimaryAttack = 0.15;
        return;
    }

    m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
    m_pPlayer->m_iWeaponFlash = NORMAL_GUN_FLASH;

    m_iClip--;
    m_iBurst--;

    // ... rest of code
At the bottom:
    // ... rest of code

    m_flNextPrimaryAttack = GetNextAttackDelay(0.1);

    if (m_flNextPrimaryAttack < UTIL_WeaponTimeBase())
        m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.1;

    if (m_iBurst < 1)
    {
        m_flNextPrimaryAttack += 0.5;
        m_iBurst = m_iMaxBurst;
    }

    m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat(m_pPlayer->random_seed, 10, 15);
}
You'd then need to make a check if the fire button had been released in the middle of a burst to reset m_iBurst back to m_iMaxBurst.
Posted 5 months ago2024-08-27 09:11:41 UTC
in Everybody talking about Half-Life 3 again Post #349095
I think Half-Life 3 wouldn't be successful or even considered good without Marc Laidlaw.
it's true that Mark Laidlaw made the Half-Life storyline something that no one else would have done. This will never happen again, and therefore Gabe, at one of his private conferences, admited that they never once got involved in the development of the third episode, but everything ended in dysmaralia, depression, and eventually they moved away from all this.
Combiner 1P Combiner 1PEvolve. Control. Combine.
Posted 5 months ago2024-08-27 09:05:50 UTC
in Everybody talking about Half-Life 3 again Post #349094
I'm honestly exited for Valve to fail and lose its reputation. This has gone on for too long.
unfortunatly, this is how it will be. It is very difficult to make a sequel so that it is as good as the first game, but with drastic changes, and at the same time not ruin everything.
Combiner 1P Combiner 1PEvolve. Control. Combine.
Posted 5 months ago2024-08-27 08:12:55 UTC
in Everybody talking about Half-Life 3 again Post #349093
I think Half-Life 3 wouldn't be successful or even considered good without Marc Laidlaw. Isn't it he that made the game what it is more than Gabe? And the community is possibly too nitpicky with the quality of the game to accept an "At Least Decent" game.

I'm honestly exited for Valve to fail and lose its reputation. This has gone on for too long.
Meerjel01 Meerjel01I want to be a Meerjel
Hi im trying to change the color of the help text (the text right to the bright yellow text) but cant seem to find how to... i've tried editing all the color values on the resource/ClientScheme.res file but everything stayed the same, then i saw an old thread that said changing or creating a "colors.lst" file at gfx/shell with some stuff also changed the colors (even with some images of it working) but maybe since the 25th version it no longer uses these cuz apparenlty i was even supposed to find it on the vanilla half life folders it wasnt there.. but even after creating it it still didnt worked or maybe im just doing it wrong...
User posted image
dont mind my current bg..
Diechie Diechiehello!
Posted 5 months ago2024-08-27 04:25:00 UTC
in code modding counter strike? Post #349090
dang. oh well
I'm trying to make a fire selector for my mp5(when you press right mouse button,it ,will change fire mode from fully-automatic to 3 round burst,then to simi-automatic),I have already done the fully-automatic part and simi-automatic part,but don't know how to make the 3 round burst.Can someone help me?
Posted 5 months ago2024-08-26 21:39:29 UTC
in Everybody talking about Half-Life 3 again Post #349088
Personally, i strongly believe they are developing something
I'm sure they're always developing something. I'm guessing that, right now, the gamedev work is mainly distributed across Deadlock (production and testing) and Counter-Strike 2 (maintenance and hopefully content updates), with maybe, maybe just a little bit of wiggle room? For an unannounced game in an early prototyping stage?

But then again, that's just a guess. I might be forgetting to take plenty of things into account.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 5 months ago2024-08-26 21:18:53 UTC
in code modding counter strike? Post #349087
Hello! In order to mod CS the way you're thinking, you need to have its whole source code. All of the weapons, gamemode rules etc. Unfortunately, there's only an official SDK for Half-Life, and an unofficial OpFor SDK, nothing for CS.

So, the best thing you can do is to replicate CS 1.6 in a HL mod, which is a respectable amount of work, annnd yeah, stuff like adding new weapons requires a good bit of C++ and HL SDK experience.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 5 months ago2024-08-26 21:12:58 UTC
in Help with JACK. Post #349086
Just as I thought, an invalid character in the path.
These old tools don't play nicely with non-ASCII characters :p
Posted 5 months ago2024-08-26 20:59:07 UTC
in Everybody talking about Half-Life 3 again Post #349085
The whole community is divided, some say that it's in development, other say it's not HL3, or it's a canceled project. Personally, i strongly believe they are developing something, but from the looks of it, it's probably not Half-Life 3. All my money goes to some random test project, maybe some sort of DLC for HL: Alyx.
Deep down, i am really hoping it's HL3, but i am ready to be disappointed.
Posted 5 months ago2024-08-26 19:15:16 UTC
in Help with JACK. Post #349084
İ fixed it my dumbass put a "İ" in the folder name thats why it gives an error.
But thanks for the effort to write this comment.
And i put my decomplied maps in a folder downloaded and my own ones.
Posted 5 months ago2024-08-26 17:46:51 UTC
in Everybody talking about Half-Life 3 again Post #349083
There will always be toxicity among humans. Regardless of something else. But yes, the Valve are not the same as they were 20 years ago.
Combiner 1P Combiner 1PEvolve. Control. Combine.
Posted 5 months ago2024-08-26 17:21:51 UTC
in code modding counter strike? Post #349082
is it possible to mod counter-strike by changing its code (like adding new weapons and changing game mechanics)? i have the half-life updated sdk, i built it with vs 2022 and in the liblist i set fallback_dir to cstrike and as expected, gordon freeman was hilariously put in a counter-strike map. you'd probably need a whole new sdk or get counter-strike's source code somehow to actually mod it like i'm thinking, right? i've just started with little c++ knowledge so this is 100% way out of my skill level
Posted 5 months ago2024-08-26 17:15:54 UTC
in Everybody talking about Half-Life 3 again Post #349081
To be honest. Valve doesn't deserve to be on top anymore with everything that is happening. Great line of games end all of a sudden? I don't care anymore, less toxicity among people then.
Meerjel01 Meerjel01I want to be a Meerjel
Posted 5 months ago2024-08-26 15:53:37 UTC
in Everybody talking about Half-Life 3 again Post #349080
Very profound.
Combiner 1P Combiner 1PEvolve. Control. Combine.
Posted 5 months ago2024-08-26 14:12:53 UTC
in Everybody talking about Half-Life 3 again Post #349079
Valve leaves traces of game prototypes and does other stuff out of practical reasons, which some people misinterpret as them secretly working on something. I honestly really doubt they're working on anything Half-Life-related on a meaningful scale.
(one or two people could be developing some mini prototype at any point, but for it to have any meaning, it needs to be in actual production)

The "White Sands" stuff isn't really telling of anything, the Black Mesa biotech company very much looks like a fan-made thing, and everything else is just a whole bunch of nothingburger, nothing to get excited about, really.

There's also the possibility that Valve is intentionally trolling us. If I worked at Valve, I'd do the same just to spite the community. Waiting for HL3 has been a meme for such a long time, it makes perfect sense to make fun of it and people's never-ending hope for the game. It's almost a bit like, uhh, Minecraft removing Herobrine every update.

Me personally, I couldn't care less at the very moment. If it turned out that I was way too sceptical and Half-Life 3 actually got a trailer one day, great, I'll probably get very excited for a brief moment. If it never happens, no big deal, I never expected it anyway.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 5 months ago2024-08-26 13:11:58 UTC
in Everybody talking about Half-Life 3 again Post #349078
High-profile events, people started talking about Half-Life 3 again, they say that the Valve are preparing something worthwhile. But after looking through the news, it becomes clear that they are not going to release anything exept Deadlock. What do you think about this?
Combiner 1P Combiner 1PEvolve. Control. Combine.
Posted 5 months ago2024-08-25 20:59:09 UTC
in Help with JACK. Post #349077
These decompiled map files you downloaded, were those in a different directory from the ones you decompiled yourself?
Because that question mark in the path from the error message implies there is an invalid character in that directory name.
Posted 5 months ago2024-08-25 17:16:47 UTC
in Help with JACK. Post #349076
First im new.
Anyways im trying too open map c1a0 in JACK but it doesnt work i tried with other decomplied files from the internet and locally decomplied ones. None of them work including other decomplied non c1a0 maps too. İ tried with my own decomplied maps but they work just fine. İ dont get it.
This is the error i get everytime i try to open a map that i didnt created: Error: can't read "D:\DECOMP?LED\c1a0.map" (Invalid argument)
(İ FİXED İT İM A DUMBASS)
This post was made on a thread that has been deleted.
Posted 5 months ago2024-08-24 09:26:48 UTC
in Host_error: PF_setview_I: not a client Post #349074
Thank you, that's works now
Posted 5 months ago2024-08-23 13:44:47 UTC
in Host_error: PF_setview_I: not a client Post #349073
The activator of trigger_camera should be a player, but entities like trigger_auto and trigger_relay act as activators of their targets due to code.
The error occurs because trigger_camera tries to transfer its view to the non-player entity (trigger_auto).
Unlike trigger_auto and trigger_relay, entities like func_button, func_rot_button, func_door, func_door_rotating, trigger_once, trigger_multiple, all game_ entities and multi_manager can pass their activators to their targets as is.

My advice is to draw a trigger_once brush around info_player_start and set the target to the entity that trigger_auto is targeting, which should fix the problem.
[-TR-] 3mirG [-TR-] 3mirGThe Turkish Half-Life modder.
Posted 5 months ago2024-08-23 12:53:42 UTC
in Host_error: PF_setview_I: not a client Post #349072
Hello, I am developer of a PS2 HL2 port.

I tried to make an intro by using trigger_auto, but I got this (Host_error: PF_setview_I: not a client) error
I am some type of newbie in this, so I would like to know how it is possible to solve this problem
Heres the picture with this error and .rmf of map (https://disk.yandex.ru/d/WE8PtdaC9WUIWA)
Map works fine on PC

(english is not my native language, so sorry for mistakes in text)
half life decay LD pack barney to HARD-LIFE barney
Can you give more specifics. What is it that you're trying to port to which model?
monster_urby monster_urbyGoldsourcerer
Yeah, i don't think you got me. Just grab the original Decay model, and use the reference's skeleton to rig your other mesh. (Example: "v_colette" skeleton + v_barney hands).
I just found out how to do it so nevermind, but here's how I did it for people in the future if they need it.
//this gets a pointer to the viewmodel
cl_entity_t* viewmodel = gEngfuncs.GetViewModel();
if (viewmodel)
{
     //I just set it to the sine of the time because that's what I need but yeah
     viewmodel->curstate.controller[0] = (sin(gpGlobals->time);
}
Awesome! Good job! 🙌
Thanks! I converted my original .bmp files I had into .tga's with irfanview and it worked!
User posted image
Is it possible to set a viewmodel's bone controller's value either from server-side or client-side code? I need this to move a bone programmatically, but I can't think of any other ways to do it and I've tried every way I could think of to alter the controllers value, and not a single one worked. Namely getting the weapon entity in the server-side code and setting its bone controllers is what I've tried the most.
I'd recommend converting from the RGB images the 8-bit images came from, if possible, for better colour quality.

As for software for doing the conversion I can highly recommend IrfanView. It's free and does the best job of colour preservation when reducing an image's bit depth that I'm aware of.
well, theres too many .SMD files for me to do that, and plus, then it would mess up the other animations i think.
let me know if im wrong
Well, rigging the model with the old skeleton would be your way to go.
Thanks, do you know a program I can use to convert my tga's from 8-bit to 24-bit?
Using Wally they've likely become indexed 8-bit images, while GoldSrc uses 24-bit TGA (AKA RGB True colour).
The dimensions being 256x256 is correct though.
I used Wally to put all of the pictures into a wad so Wally generates their palettes, I then selected all of the skybox images and exported them in a group into TGA's into the gfx/env folder of my mod folder.

J.A.C.K. also gave me a similar error:
"Warning: TGAImageLoader: Only type 2 (RGB), 3 (gray), and 10 (RGB) TGA images supported"
I ignored the warning and started the game anyway after compiling the map, it defaulted to the default skybox, and gave me this error in the console:

LoadTGA: Only type 2 and 10 targa RGB images supported
R_LoadSkys: Couldn't load gfx/env/goldskyrt.tga

Does wally not support the kind of TGA's that half life needs?
all the images are also 256 by 256.
thank you monster_urby, but then how would i port over the decay anims? there isnt really many other ways besides renaming the bones or pain-stakingly recreating the animations by myself. if there is a more easy way to do this, please do let me know, thanks for the response though.
Note: I'm not a modeller or an animator, but I get by with what I know.

Don't rename the bones. That's going to mess with all the references in your models .qc file and yeah, it's going to require all the other animations to be redone.
monster_urby monster_urbyGoldsourcerer
Posted 6 months ago2024-08-16 21:31:21 UTC
in How can i use the paranoia renderer on my mod? Post #349053
Nothing to do with Hammer I'm afraid. That's just a level editor. The mapping tools with that toolkit are simply for making your own Paranoia maps.

If you're wanting to use their renderer in your own project, you're going to need to know how to take their code and implement it into your own.
monster_urby monster_urbyGoldsourcerer