Is it possible to attach an "auto_mg42" or a "zombie_spawn_zone" onto the head of a zombie and how is it done?

I am kind of obsessed with the idea of attach a template to entities so I am attempting to make the zombie mode become more chaotic. I first try to use the following code to stick a custom auto_mg42 onto the zombie.

auto_mg42_head{
  _use:t="auto_mg42"
  team:i=3
  auto_gun_controller__targetTeam:i=1
  interactable:b=no
}
zombie_auto_mg42{
  _use:t="zombie_walk_zombie"
  "attach_decorators__entities:list<eid>"{ 
  }

  "attach_decorators__templates:array"{
    "attach_decorators__templates:object"{
      relativeTm:m=[[1, 0, 0] [0, 1, 0] [0, 0, 1] [0,0,0]]
      template:t="auto_mg42_head"
      nodeName:t="Bip01 Head"
    } 
}
}

But it clearly wasn’t that simple, was it?

I’m not an expert at attaching stuff to other stuff but i don’t think the auto_mg42 is a decorator.

Why not just give the MG-42 to the armoured_zombie?

I want the zombie to still run at you while the sentey gun on his head shoots you down automatically(i reduced the damage so it is not melting players)
The AI just suck and cant even shoot before they are dead.

Also this is a prove of concept. The thing i actually want is the rally point zombie. It will act as a mobile respawn point while its alive.

I see you didn’t add extends/use base_vehicle_decor. So… When zombie will die then turret will stay on map probably foever.

Would be nice to see more details/info about problems. Well… Anyways I’ll check it a bit later. IIRC your code should work fine.

It just dont appear on the zombie head and no bullets are shot.
So it is successfully attached
Though there are no errors on the log

I used your code, but added base_vehicle_decor to auto_mg42_head. And it works fine? Except that the bullets don’t hit the players and zombies are killed instead. Probably need a bit rotate/move mg42?


You can move/scale it in editor.

But then you need edit attach_decorators__templates. Just need remove any symbol, apply changes and add it again. Sphere nearbly property should be visible:

And then save map → open scene.blk → find your zombie and use him relativeTm.

Well… It still kills zombies sometimes, but works…


I also edit it in mg42:

  auto_gun_controller__targetOffset:p3=0,0,0
  auto_gun_controller__traceTime:r=0.0
1 Like

Ok they do shoot and they do work. Except sometimes they drop the gun for no reason. I have undestroyable_ri_extra on the gun but they still drop the gun while walking.

auto_mg42{
  _override:b=yes
  team:i=1
  auto_gun_controller__targetTeam:i=3
  auto_gun_controller__targetOffset:p3=0, 0, 0
  interactable:b=no
  "ai_target__targetForAiGunner:tag"{
   }
}
auto_mg42_head{
  _use:t="auto_mg42"
  _use:t="base_vehicle_decor"
  _use:t="undestroyable_ri_extra"
  team:i=3
  auto_gun_controller__targetTeam:i=1
  interactable:b=no
  gun__kineticDamageMult:r=0.02
  gun__locName:t="Auto MG42"

}
zombie_auto_mg42{
  _use:t="zombie_walk_zombie"
  killLogName:t="Uber-sentry gun carrier"
  "attach_decorators__entities:list<eid>"{ 
  }

  "attach_decorators__templates:array"{
    "attach_decorators__templates:object"{
      relativeTm:m=[[1, 0, 0] [0, 1, 0] [0, 0, 1] [-0.12, 0.38, 0.01]]
      template:t="auto_mg42_head"
      nodeName:t="Bip01 Head"
    } 
}
}

Annnnnnnd the enlisted client crashes when the zombie spawn in a custom map!
Its not server crash, the entire client just dies and the send report dialog appears

It’s because sometimes mg42 accidently hits another mg42 or you hit it. Try to increase hitpoints or change collision res.

Damn. When exacly it happends? Tank spawn?

When the auto_mg42_zombie spawns at wave 3, all clients crashes (i have a friend testing with me and he crashed as well)

No they drop on their own without even getting fired at. Also i added undestroyable_ri_extra

And they appear only in this wave? I mean that they don’t spawn in wave 1-2?

Uh… Weird. I’ll check it later then. Maybe zombie attack it.

Can you give link to mod again p-please? Or add it to your profile info?

It work probably only for RI (rendinsts).

correct

ok link here: https://drive.google.com/drive/folders/1GTnnd2JyxXENfXEXGyxC36x-MUOVqWk7 (inside the Gavutu zombies timeline disorder folder) Let me add to my profile info later

ah ok

1 Like

Any updates?
Btw you need to add the mg42 zombie to zombie_spawn_mode because the version on drive right now has their spawns removed (code still remain in entities.blk)

I just tried last night and it still crashes.

So in this whole week that i am thinking, maybe i have to remove some codes that just not working, like the undestroyable_ri_extra tag. I need to at least make it not crash game clients (really the server are not crashed, only player clients