Hello dear sirs and ladies.
I am here to ask you for a favour.
I've almost finished working [B][URL="http://facepunch.com/showthread.php?t=1104165"]on that pack[/URL] [/B]but I have no clue how to make zombie based AI without having model overridden with regular zombie.
I sincerely hope any of you could help me accomplish the pack or atleast share the secret knowlege of scripting.
Thanks for having a look.
[QUOTE=DP Films;37674838]
[thumb]http://cs303406.userapi.com/v303406431/2ef0/yHmeahFst3E.jpg[/thumb][/QUOTE]
I've actualy been wanting to do somthing similair but never tried it. Perhaps maybe using the SetModel() command on and NPC? I've never tested it on npcs but they're derived from entities so it should work. I also belive the model would need matching animations for this to work. I can give more info after testing it out myself. I don't know if this is what you did already but I don't see why it wouldn't work.
[QUOTE=TurbomanAlco;37848889]I've actualy been wanting to do somthing similair but never tried it. Perhaps maybe using the SetModel() command on and NPC? I've never tested it on npcs but they're derived from entities so it should work. I also belive the model would need matching animations for this to work. I can give more info after testing it out myself. I don't know if this is what you did already but I don't see why it wouldn't work.[/QUOTE]
Setmodel did help but after killing an NPC I get headcrab and classic zombie models. As for the animations everything is set up.
I think you'll need to use entity based AI?
Sorry if I'm wrong I'm not a lua guy.
[QUOTE=jellofacey;37854711]I think you'll need to use entity based AI?
Sorry if I'm wrong I'm not a lua guy.[/QUOTE]
Yeah, it has to be custom created NPC.
Not sure if anyone is willing to do this though.
I've seen people do this before and it has the proper ragdoll body when they die. I'll look into some already made examples and let you know what I find. For now you can try [url=http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexde03.html]this[/url], but I don't think it's necessary for somthing like what you're doing. I would use the zombine as a base npc since it's more combine like, if that's not what you're already using.
Ok I got an example here and it's actualy a lot more simple than you might think. Yet again somthing I've never tested but it worked for somebody else in Garrysmod 12. It may not work in Garrysmod 13.
[lua]
local NPC = { Name = "Zombine Custom",
Class = "npc_zombine",
Model = "PUT MODEL PATH HERE",
Category = Category } //I think you can change the second category to the name of where it goes
list.Set( "NPC", "npc_zombine_custom", NPC )
[/lua]
This may be done different in Garrysmod 13, but like I said I've never tested it before. Edit all of that to however you'd like so don't be afraid to change anything. If you want it to be based of a normal zombie use npc_zombie instead of npc_zombine under class.
[QUOTE=TurbomanAlco;37862302]I've seen people do this before and it has the proper ragdoll body when they die. I'll look into some already made examples and let you know what I find. For now you can try [url=http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexde03.html]this[/url], but I don't think it's necessary for somthing like what you're doing. I would use the zombine as a base npc since it's more combine like, if that's not what you're already using.
Ok I got an example here and it's actualy a lot more simple than you might think. Yet again somthing I've never tested but it worked for somebody else in Garrysmod 12. It may not work in Garrysmod 13.
[lua]
local NPC = { Name = "Zombine Custom",
Class = "npc_zombine",
Model = "PUT MODEL PATH HERE",
Category = Category } //I think you can change the second category to the name of where it goes
list.Set( "NPC", "npc_zombine_custom", NPC )
[/lua]
This may be done different in Garrysmod 13, but like I said I've never tested it before. Edit all of that to however you'd like so don't be afraid to change anything. If you want it to be based of a normal zombie use npc_zombie instead of npc_zombine under class.[/QUOTE]
Nope, the model is still overridden. And I don't really like zombine AI since always draws grenade and die.
[QUOTE=DP Films;37867433]Nope, the model is still overridden. And I don't really like zombine AI since always draws grenade and die.[/QUOTE]
Must be a Garry's Mod Beta bug because it has always worked. And your right about the zombine going suicide all the time. I actualy have a theory to making a whole new zombine through lua. This interests me mostly because of the gamemode Zombie Waves I'm making which you can access under gamemodes. So you can be 100% sure I'll have somthing for you in the near future on this. Zombie AI is what I've got next in line.
Alright. I found guy who made zombie NPC with custom sounds bad thing it doesn't leave headcrab after dying but I'm still happy with it. He used some monster base. Thanks everyone for trying to help.
[QUOTE][IMG]http://cloud-2.steampowered.com/ugc/559828133796926900/0C4B3212BCD6CF6B76D0B14D234A6E8BB0359D41/[/IMG][/QUOTE]
[QUOTE=DP Films;37895182]Alright. I found guy who made zombie NPC with custom sounds bad thing it doesn't leave headcrab after dying but I'm still happy with it. He used some monster base. Thanks everyone for trying to help.[/QUOTE]
Yeah that part seems a bit hard. Maybe you can make the headcrab a body group for the model and then have the code set the body group to no head crab when it dies. This way you can make a new head crab npc where the head would be when its dead. If the npc takes damage to the head when it dies then the headcrab body group stays and the whole thing dies. It's surely possible. I would also set zombine sounds for the npc as well which shouldn't be to hard.
[QUOTE=TurbomanAlco;37899630]Yeah that part seems a bit hard. Maybe you can make the headcrab a body group for the model and then have the code set the body group to no head crab when it dies. This way you can make a new head crab npc where the head would be when its dead. If the npc takes damage to the head when it dies then the headcrab body group stays and the whole thing dies. It's surely possible. I would also set zombine sounds for the npc as well which shouldn't be to hard.[/QUOTE]
Headcrab is bogygrouped. But as I wrote I can do nothing special with coding.
[QUOTE=DP Films;37895182]Alright. I found guy who made zombie NPC with custom sounds bad thing it doesn't leave headcrab after dying but I'm still happy with it. He used some monster base. Thanks everyone for trying to help.[/QUOTE]
Could you tell me where you got that?
I've been working on something similar but it keeps using the default zombie models.
Thanks in advance
[QUOTE=jellofacey;37917042]Could you tell me where you got that?
I've been working on something similar but it keeps using the default zombie models.
Thanks in advance[/QUOTE]
xystis base
it doesn't work that good with gm13
[QUOTE=DP Films;37902923]Headcrab is bogygrouped. But as I wrote I can do nothing special with coding.[/QUOTE]
You might wanna check out some addons that deal with bodygroups and see how they do it, it will probably be only a couple of lines to do what you want.
[QUOTE=DP Films;37919165]xystis base
it doesn't work that good with gm13[/QUOTE]
Shat I cant find that base
Can you please Link me to it?
Sorry, you need to Log In to post a reply to this thread.