NPCs = Destroy Doors Help

I’ve been coding on a survival gamemode for some time now until I ran into this problem.
For the sake of fun and running, I want my SNPC Zombies to destroy doors that will then reappear some minutes after. (Like the Shotguns for Realistic CSS and the zombies from RD)
I tried to look up the code in both scripts and even tried myself but I aint able to manage it.

Could somebody help me with this, I would appreciate it.
(and you will get credit for helping)

Bump

bump

AAAARGH, TOO MANY BUMPS!

Anyway, do you want to completely remove the doors or turn them into physics objects that fly to the other side of the room?

physic objects would be the perfect. :slight_smile:
But they should reappear again as a normal door some time after.

I know the Zombie Onslaught gamemode in the garrysmod beta SVN gives it’s zombies that ability, you could look there.

I did look in that gamemode, but couldn’t really figure it out.

bump

Create physics object
Set it to door’s model
Make it fly
Set door’s collision group to COLLISION_GROUP_NONE
Set door’s color (or alpha) to 0.
Make timer
Remove physics object
Put door back.

How would that look like in a LUA code?

OP clearly is editing a zombie gamemode and has no idea how to code key things that tell me this away are as follows

  1. LUA
  2. Has been given examples of scripts that do it and still fails
  3. clearly has not even tryed since he is not posting any code

Dear OP please put this in the request section since you clearly dont want to do this your self

Why destroy it when you can make the npc open it. Derp.

Because zombies aren’t polite. Derp.

For the destruction itself just use the code from one of those door busting sweps, as for triggering it maybe you could make the npc hate doors and detect damage taken by a door from an NPC to trigger the destruction.

LUA isn’t an acronym so its Lua.

That was my point…

Nice bump spam.

… Why post, cause your just bumping it even more, And no, i am not, cause i posted this straight after you posted :stuck_out_tongue:

Thanks Dave and Quebec for advises.

And for some posters (You know who especially Flawless since i’ve now watched several posts from him in threads) Please remember that I do not try to make some fancy pancy gamemode.
I’ve been trying to code lua for some time now, I can read code and make something myself too. But im still on need-to-learn basis and asking about code and npc is therefore an help for both learning and a help for the gamemode to function and work properly. I’m not trying to make the nextgen something with codes from others.

I’m asking for help. Normal newbie help and therefore it is annoying to get judged upon what you think I do instead of asking me. Because not everyone’s are asking for quick solutions for a full functional solution in a thread but an actual help with a working example.