Garry's Mod

Garry's Mod

Star Wars: Rebel Troopers
 Denne tråd er blevet fastgjort, så den er sikkert vigtig
Captain Charles  [udvikler] 20. feb. 2016 kl. 17:45
NPC Not Working
Hello, and thank you for subscibing to this addon. I wanted to write this post to say that for some reason, the NPCs on this addon are currently broken. I'm not sure why they aren't working, but I'm trying to get help fixing them.

This will probably be the ONLY addon I release that will include NPCs since I am okay with these rebels using standard rebel AI.
< >
Viser 1-3 af 3 kommentarer
kev675243 23. feb. 2016 kl. 15:58 
Do you want me to help you out? I am more than willing to help fix the npcs
Captain Charles  [udvikler] 23. feb. 2016 kl. 20:41 
Sure, This is what I have in the autorun currently. This should call for the model but also randomize which one is spawned.

Standard male 1 through 9
local NPC = { Name = "Rebel Trooper Captain", Class = "npc_citizen", Model = "models/SGG/Starwars/Rebels/r_trooper_captain/male_01.mdl", Category = Category, SpawnFlags = SF_CITIZEN_RANDOM_HEAD, KeyValues = { citizentype = CT_REBEL, trooper_captain = 1 }, Weapons = { "weapon_pistol", "weapon_ar2", "weapon_smg1", "weapon_ar2", "weapon_shotgun" } } list.Set( "NPC", "Rebel_trooper_captain", NPC ) hook.Add("PlayerSpawnedNPC", "trooper_captain_initmodel", function(pl, npc) if IsValid(npc) then local keyValues = npc:GetKeyValues() if keyValues["trooper_captain"] then local nTrooper = tonumber(keyValues["trooper_captain"]) if nTrooper == 1 then npc:SetModel("models/SGG/Starwars/Rebels/r_trooper_captain/male0" .. math.random(1,9) .. ".mdl") end end end end)

Standard males 1 - 9 but with two extra races added, which brings it up to 11.
local NPC = { Name = "Rebel Soldier (Forest)", Class = "npc_citizen", Model = "models/SGG/Starwars/Rebels/r_soldier_forest/male_01.mdl", Category = Category, SpawnFlags = SF_CITIZEN_RANDOM_HEAD, KeyValues = { citizentype = CT_REBEL, trooper_soldier_forest = 1 }, Weapons = { "weapon_pistol", "weapon_ar2", "weapon_smg1", "weapon_ar2", "weapon_shotgun" } } list.Set( "NPC", "Rebel_soldier_forest", NPC ) hook.Add("PlayerSpawnedNPC", "soldier_forest_initmodel", function(pl, npc) if IsValid(npc) then local keyValues = npc:GetKeyValues() if keyValues["soldier_forest"] then local nTrooper = tonumber(keyValues["soldier_forest"]) if nTrooper == 1 then local nRand = math.random(1,11) npc:SetModel("models/SGG/Starwars/Rebels/r_soldier_forest/male" .. (nRand < 10 && "0" || "") .. nRand .. ".mdl") end end end end)
Sidst redigeret af Captain Charles; 23. feb. 2016 kl. 20:41
lucfle97 20. aug. 2016 kl. 20:52 
There's a person who contributes to the lazarus rp server who reuploaded this addon with working npc's. maybe you should contact her for help on it. I think it's a she
here's the addon
http://gtm.steamproxy.vip/sharedfiles/filedetails/?id=685331561
Sidst redigeret af lucfle97; 20. aug. 2016 kl. 20:54
< >
Viser 1-3 af 3 kommentarer
Per side: 1530 50