• Making a rebel(npc_citizen) hate anything that is a player
    0 replies, posted
Hello. I'm making a gamemode, and one of the key features is that rebels try to kill players. How would I do this? I've been using both NPC:AddEntityRelationship and I've tried using NPC:AddRelationship in my NPC spawn code(I used player.GetAll, I don't know what the entity name of a player is). How would I do this? If you need the NPC spawn code, well, here: [CODE]function SpawnCitizen( pos ) NPC = ents.Create( "npc_citizen" ) NPC:SetModel( "models/Humans/Group03/Male_04.mdl" ) NPC:SetPos( pos ) NPC:SetKeyValue( "spawnflags", 768 ) NPC:Spawn() NPC:AddRelationship( "player.GetAll, D_HT, 99" ) NPC:Give( "ai_weapon_smg1" ) NPC:SetCurrentWeaponProficiency( WEAPON_PROFICIENCY_GOOD ) NPC:Fire("StartPatrolling","",0) end[/CODE] NOTE: I know that "player.GetAll" isn't an entity. However, I don't know what the entity of a player is called.
Sorry, you need to Log In to post a reply to this thread.