Combine: Hostile to Friendly.

archvilell

Newbie
Joined
Nov 22, 2004
Messages
408
Reaction score
0
I didn't know whether this was a coding question since it deals with the working insides of a combine or a mapping question since Combines go in maps, but since this page has more traffic, I posted it here.

Anyway, how would I make a Combine be Friendly rather than Hostile. I don't see any Flags or an option to change in the properties. I'm trying to make a mod where you are a Combine rather than Gordon or a Resistance.

Any ideas?
 
To make things clear: there's an ai_relationship entity.
If you want the subject to be friendly to the player, set the target as !player
 
Thanks guys. Heh, the first time I tried it, I was running over to them saying, "Hi buddy!" only to be met be the wrong end of a handgun pointed at my head, heh heh heh.

Anyway, thanks again.

Oh, btw, where would I go to learn how to make them start seated? Or pacing?
 
Sorry for the double post. Didn't think of this until now. Are stun batons player-usable weapons, or will I have to create my own model and animation for it?
 
Oh, you started another thread.
I've been doing some replies on the thread about coding the guns and stuff.
Didn't realize this thread was here.
 
Yeah, my problem kind of envelopes both coding and mapping, so I put it in both. I found out how to make them fight each other much easier though, Red. I used the ai_reationship entity in Hammer. Say you want Combine to be your friends and Resistance to hate you. Create an ai_relationship entity and edit the properties. It's easy if you read it like a sentence. Read it "The <Subject> <Disposition> <Target>." Put in an NPC metrocop and name him Combine. Change the Disposition to Like and the target to "!player" minus the quotes (that's you). Now "The Combine Like !player." Ta da. Some tweaking will make the Resistance hate you. Combine and Resistance do hate each other, but I found that the Resistance won't attack them. Maybe that's because they only had a beer bottle and the Combine had a shotgun, but I'm not sure. I put in a new AI_relationship anyway just to make sure.

That's a little easier than changing the code, unfortunatly I think I will have to put it in every map or things will go back to normal.

Do you know if it's possible for the player to use a stun baton? It seems silly for Valve to make Combine use it, but not allow the Player to pick it up. I must be doing something wrong.
 
If you wanna change it in the code, open hl2_gamerules.cpp and around line 324 you will see the ai table. Find the classes you want to alter and change the last value in the row.

ie:

This bit of code says that CLASS_COMBINE hates CLASS_PLAYER_ALLY. it lists the subject class, the target class, the disposition, and the degree of that emotion

Code:
CBaseCombatCharacter::SetDefaultRelationship(CLASS_COMBINE,CLASS_PLAYER_ALLY,D_HT, 0);

change to
Code:
CBaseCombatCharacter::SetDefaultRelationship(CLASS_COMBINE,CLASS_PLAYER_ALLY,D_LI, 0);

to make the combine friends with class_player_ally
 
Cool. Thanks for the bit of code. I'll stick that bit in when I get a decent coding program. I think I could tweak that so the resistance hate me and the civilians fear me. That would be a lot easier than putting ai_relationship changers in every map.

Thanks.
 
the one thing I think might be wrong with your mod is that valve has hinted at shepered starring in another expansion. also, purly out of personal opinion, would he really want revenge on freeman? in the original expansion he was a victim just like everyone else - trying to survive. just a thought, might be nothing.
 
Well, as of so far, I just through the revenge bit in. I don't think it will be hinted at at all, since the character never speaks. You will be just following orders from higher-ups.

As for Valve hinting of another expansion, I had already considered this. If they did, it wouldn't bother me. Actually, it would probably make me happy just so I could have something to try and top in some way. That and I could play a professionally made game.
 
Back
Top