Talk:Ai relationship: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(AI relationsships are confusing.)
Line 22: Line 22:
:::How about using [[Ent fire|ent_fire]] and send out SetRelationship input? [[User:N-neko|n-neko]] 02:39, 1 Oct 2005 (PDT)
:::How about using [[Ent fire|ent_fire]] and send out SetRelationship input? [[User:N-neko|n-neko]] 02:39, 1 Oct 2005 (PDT)
::::That's what I was thinking of. It's so obvious now...:o --[[user:TomEdwards|TomEdwards]] 05:22, 1 Oct 2005 (PDT)
::::That's what I was thinking of. It's so obvious now...:o --[[user:TomEdwards|TomEdwards]] 05:22, 1 Oct 2005 (PDT)
Is there someone here who can look at the source code for AI relationships? ...because they're complicated:
* If I put a nice relation for !player towards a headcrab, I will lower my gun against it, but if the crab it hostile, I will raise my gun when it spots me.
* I can also still shoot headcrabs I like with my gun lowered.
* A metropolice will still attack when fearing (at least the player).
I could do a lot of testing, but it would be easier if someone could check the sourcecode.
--[[User:Andreasen|Andreasen]] 00:09, 8 Apr 2006 (PDT)

Revision as of 00:09, 8 April 2006

What are you supposed to use for a classname or targetname if you want the relationship to change torwards the player? Will info_player_start work?

Yes, and what if the game is multiplayer? What targetname/classname do you use for that? Valve's documentation on that seems to be missing. --TheJ89 13:24, 17 Jul 2005 (PDT)

In singleplayer, !player (which is a pointer pointing twoard the local player entity) will pretend be treated as a targetname and treat the player thusly.--TheJ89 13:27, 17 Jul 2005 (PDT)

And I have read that player (without the !) targets all players in singleplayer or multiplayer games. I have not confirmed this. —Maven (talk) 11:34, 17 Sep 2005 (PDT)

That will def work coz it's a classname, and the i/o system likes classnames —Ts2do 11:48, 17 Sep 2005 (PDT)

How does one get an NPC to shoot at a particular object (not another NPC)? ai_relationship doesn't work for this, and ai_changetarget doesn't affect NPCs. —Maven (talk) 12:05, 17 Sep 2005 (PDT)

Ah, it seems to be done with an npc_bullseye, somehow. —Maven (talk) 14:44, 17 Sep 2005 (PDT)
Example --wisemx 15:38, 17 Sep 2005 (PDT)
Thank you. —Maven (talk) 17:04, 17 Sep 2005 (PDT)

Is it possible to do something like this in-game? --AndrewNeo 11:07, 30 Sep 2005 (PDT)

It is in-game...--TomEdwards 11:29, 30 Sep 2005 (PDT)
Sorry, stupid question. I meant in the console. --AndrewNeo 18:48, 30 Sep 2005 (PDT)
There is, but damned if I remember it. ;-) --TomEdwards 01:58, 1 Oct 2005 (PDT)
How about using ent_fire and send out SetRelationship input? n-neko 02:39, 1 Oct 2005 (PDT)
That's what I was thinking of. It's so obvious now...:o --TomEdwards 05:22, 1 Oct 2005 (PDT)

Is there someone here who can look at the source code for AI relationships? ...because they're complicated:

  • If I put a nice relation for !player towards a headcrab, I will lower my gun against it, but if the crab it hostile, I will raise my gun when it spots me.
  • I can also still shoot headcrabs I like with my gun lowered.
  • A metropolice will still attack when fearing (at least the player).

I could do a lot of testing, but it would be easier if someone could check the sourcecode. --Andreasen 00:09, 8 Apr 2006 (PDT)