^^
I want a traitor weapon made that when an innocent is shot, it would kill them after like 10sec and create a zombie in there place. The hl2 zombie would be fine, or a different zombie script whatever.
Buuuuut I want the zombie to use whatever skin the inno was using. So is that something that can even be done?
Moon.
Not exactly.
If you created a HL2 Zombie, you couldn't set the model to the player's. The most logical solution would be to make a NextBot that has the player's model, the problem is, NextBots need to access the map's Nav-Mesh files and TTT Maps do not have it.
Greg, I think he's just wanting the player to die and a zombie spawn where they were? If so that's very possible, and actually wouldn't be too hard.
[QUOTE=Moongoat;41574637]^^
I want a traitor weapon made that when an innocent is shot, it would kill them after like 10sec and create a zombie in there place. The hl2 zombie would be fine, or a different zombie script whatever.
Buuuuut I want the zombie to use whatever skin the inno was using. So is that something that can even be done?
Moon.[/QUOTE]
There is something like that on the workshop: [url]http://steamcommunity.com/sharedfiles/filedetails/?id=162033429[/url]
And there is another server that uses a 'Poison Dart' T weapon that poisons the player shot and kills them after around 10 seconds or so.
Nooope, I want the zombie using the players skin.
You'd want to use this
[URL="http://wiki.garrysmod.com/page/Entity/GetModel"]/Entity/GetModel[/URL]
and then apply the skin to a basic nextbot zombie.
[QUOTE=rejax;41578752]You'd want to use this
[URL="http://wiki.garrysmod.com/page/Entity/GetModel"]/Entity/GetModel[/URL]
and then apply the skin to a basic nextbot zombie.[/QUOTE]
But these nextbots wouldn't work in ttt would they? :/
[t]http://puu.sh/3KYA8.png[/t]
Giving dumb ratings now ensue insults
[QUOTE=MrGregsWorld;41574719]Not exactly.
If you created a HL2 Zombie, you couldn't set the model to the player's. The most logical solution would be to make a NextBot that has the player's model, the problem is, NextBots need to access the map's Nav-Mesh files and TTT Maps do not have it.[/QUOTE]
Of course you can.. I don't know why, but you try and make it sound like you know what you're talking about but you don't.
[URL="http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index707e.html"]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index707e.html[/URL]
An updated example of bonemerging:
[lua]
if SERVER then
local npc = ents.Create("npc_zombie")
npc:SetPos(vector_origin)
npc:Spawn()
else
local zombie = ents.FindByClass("npc_zombie")[1]
zombie.mdl = ClientsideModel("models/Kleiner.mdl")
zombie.mdl:SetParent(zombie)
zombie.mdl:AddEffects(EF_BONEMERGE)
zombie:SetRenderMode(RENDERMODE_TRANSALPHA)
zombie:SetColor(Color(0, 0, 0, 0))
end
[/lua]
You can make a 'human' look like a zombie by creating a clientside model of the human and parenting+bonemerging it with the zombie npc. There are bugs when the zombie leaves the PVS though, the clientside model becomes unparented. You also have to keep track of / clean up clientside models when the zombie is killed. This is just how I do it in my in-development tool.
EDIT: Ninja'd above.
Thanks Guys! I'm gonna try that stuff.
Edit:
So I kinda suck at tables. Would this work for setting the zombie skin?
[CODE] local zombie = ents.FindByClass("npc_zombie")[1]
zombie.mdl = ent:GetModel( )
zombie.mdl:SetParent(zombie)
zombie.mdl:AddEffects(EF_BONEMERGE)
zombie:SetRenderMode(RENDERMODE_TRANSALPHA)
zombie:SetColor(Color(0, 0, 0, 0))[/CODE]
[QUOTE=Moongoat;41585330]Thanks Guys! I'm gonna try that stuff.
Edit:
So I kinda suck at tables. Would this work for setting the zombie skin?
[CODE] local zombie = ents.FindByClass("npc_zombie")[1]
zombie.mdl = ent:GetModel( )
zombie.mdl:SetParent(zombie)
zombie.mdl:AddEffects(EF_BONEMERGE)
zombie:SetRenderMode(RENDERMODE_TRANSALPHA)
zombie:SetColor(Color(0, 0, 0, 0))[/CODE][/QUOTE]
You should store the zombie entity on the player that died due to the virus by doing, "player.Zombie = myZombie".
Then you could do "local zombie = player.Zombie".
Makes sense?
[QUOTE=brandonj4;41585958]You should store the zombie entity on the player that died due to the virus by doing, "player.Zombie = myZombie".
Then you could do "local zombie = player.Zombie".
Makes sense?[/QUOTE]
Eh kinda, I'm just very new to lua. I have someone working on the weapon who knows what they are doing. I was just hoping to also learn for myself.
Wouldn't you also need to get the position of where the player died on the map? I thought if you did [code]npc:SetPos(vector_origin)[/code] It would spawn in the middle of the map.
[QUOTE=bran92don;41586943]Wouldn't you also need to get the position of where the player died on the map?[/QUOTE]
Yes of course, it's just an example.
[QUOTE=bran92don;41586943]Wouldn't you also need to get the position of where the player died on the map? I thought if you did [code]npc:SetPos(vector_origin)[/code] It would spawn in the middle of the map.[/QUOTE]
[QUOTE=brandonj4;41584014]
[B]An updated example of bonemerging[/B]:
[lua]
if SERVER then
local npc = ents.Create("npc_zombie")
npc:SetPos(vector_origin)
npc:Spawn()
else
local zombie = ents.FindByClass("npc_zombie")[1]
zombie.mdl = ClientsideModel("models/Kleiner.mdl")
zombie.mdl:SetParent(zombie)
zombie.mdl:AddEffects(EF_BONEMERGE)
zombie:SetRenderMode(RENDERMODE_TRANSALPHA)
zombie:SetColor(Color(0, 0, 0, 0))
end
[/lua][/QUOTE]
i have actually coded this system before, maybe i'll post it
[QUOTE=Ylsid;41596207]i have actually coded this system before, maybe i'll post it[/QUOTE]
That'd be awesome if you did.
This has been done quite frequently. What would be new and unique is if you set the player to an actual zombie class and let them go after everyone. Let them play as a zombie. It's what I'm planning on doing.
Basically, set the team to a different team, hook into CanPlayer Pickup Weapon and return false if zombie. Strip weapons when they join the team. Set the model to a zombie, change move speed, run speed, and give them a zombie weapon. Set their health to something else. Maybe do a hud-overlay. And remove their ability to talk via voice or text ( zombies groan )
[QUOTE=Acecool;41621154]This has been done quite frequently.[/QUOTE]
I've never seen it where the zombie looked exactly as the player did, with custom skins at least. Point me to a server where they have this please. :P
Sorry, you need to Log In to post a reply to this thread.