[help] modify turret.cpp half-life sdk Created 10 years ago2011-07-28 09:35:47 UTC by gian20 gian20

Created 10 years ago2011-07-28 09:35:47 UTC by gian20 gian20

Posted 10 years ago2011-07-28 09:35:47 UTC Post #297082
Hellow anybody...
I just want to make the turrets not to shoot at player and scientist and barney but to shoot to aliens...
and also at hgrunt not to shoot to player, scientist and barney but to only shoot to aliens...
edit
turrets.cpp
hgrunt.cpp

from half-life sdk link h**p://www.moddb.com/games/half-life/downloads/half-life-sdk-v23-for-visual-studio-2008
Posted 10 years ago2011-07-28 10:45:59 UTC Post #297083
Go to hgrunt.cpp and find the classify function. It should say
[quote]int CHGrunt :: Classify ( void )
{
	return	CLASS_HUMAN_MILITARY;
}[/quote]

Change it to
[quote]int CHGrunt :: Classify ( void )
{
	return	CLASS_PLAYER_ALLY;
}[/quote]

That's it for hgrunt.cpp, now he's your friend.

The turrets are harder for one reason: They're mechanical. The game uses their class to make sure they get out the right sounds, etc, when they get hit. But it's still fairly easy.

So, go to monsters.cpp and find
int CBaseMonster::IRelationship ( CBaseEntity *pTarget )
Find where the line that starts with *MACHINE*.
Delete the whole line, and, IN IT'S PLACE, write
*MACHINE* { R_NO ,R_NO ,R_NO ,R_NO ,R_NO ,R_DL ,R_DL ,R_DL ,R_DL ,R_DL ,R_NO ,R_NO, R_DL, R_DL },
What that does is it changes who machines hate and like. Good luck!
Posted 10 years ago2011-07-28 10:46:48 UTC Post #297084
If I understood correctly, perhaps "Spirit of Half-Life" is the thing for you. I'm not sure about the turrets, but the grunts can definitely be changed to only shoot aliens.
Jessie JessieTrans Rights <3
Posted 10 years ago2011-07-28 11:14:28 UTC Post #297085
Well, yeah, Spirit's great. I assumed, because he talked about the .cpp, he wanted to change it code-wise. Also, about the turrets, if they're not set to CLASS_MACHINE, then they don't give off the right effects when hit.
Posted 10 years ago2011-07-28 11:27:59 UTC Post #297086
I'll check it out :)
Posted 10 years ago2011-07-28 11:40:46 UTC Post #297087
Thanks! It worked! :)
Posted 10 years ago2011-07-28 12:10:20 UTC Post #297088
Welcome. And I doubt I should be the one to say this - I'm also new to the community - but welcome...to the community.
Posted 10 years ago2011-07-28 13:15:16 UTC Post #297090
tnx
Posted 10 years ago2011-07-29 10:33:53 UTC Post #297116
Dexter, a little help please the hgrunt and barney are shooting the turrets how do I remove this and the turrets are not shooting the human assasin
help...
I dont have any experience in programming in c++
Posted 10 years ago2011-07-31 02:47:47 UTC Post #297188
I think I ask many questions...
How to change the Sentry Turret Bullets to Uranium bullets?
turret.cpp

...

I think there is a gauss turret...

Sorry if I am starting new threads...
You must be logged in to post a response.