NPC/AddRelationship

From Garry's Mod
Jump to: navigation, search
 NPC:AddRelationship( )

Contents

Description

Changes how an NPC feels towards another NPC. If you want to setup relationship towards a certain entity, use NPC:AddEntityRelationship.

Arguments

string relationstring

A string representing how the relationship should be set up.

Should be formatted as "npc_class D_ Enums numberPriority".

Examples

Example

Spawns a manhack and makes it hate floor turrets.

local hack = ents.Create( "npc_manhack" )
hack:Spawn()
hack:AddRelationship( "npc_turret_floor D_HT 99" )


Personal tools
Navigation