Zombie mortarman

But everything is fine on your discord. It just happened that way. :)))))

1 Like

Unfortunately it doesn’t work

1 Like

Very unfortunate.
I might try looking at the problem in the next few days, when my exams are finally over

1 Like

Hey, any other ideas for mortars?

I suggest that you should move on from motaras for now. But i will take a look today, my exam ended just yesterday so i have infinite amount of time

I’m happy for you, I think it’s better to rest after the exams, don’t waste time on these mortars, it’s not very important to me.

Nope, writing codes is how i relax myself. I do that during my exam too.
Call me crazy but thats how i relax.

However, i am busy developing for my Nacht der Untoten map, and i currently do not have any ideas on how to make the mortars work. AI stuff are quite problematic

1 Like

You just write 2 message for question
image

2 Likes

Hello, I am coming back to this topic since I finally got some time working on it

1 Like

Hi! This is great, but I tried many options and nothing worked. It only works in the editor. By the way, with this line

combatFiringRange:p2=40.0, 150.0

you can make zombies work with different weapons at a distance from the player. It seems that someone was interested in how to make zombies use different weapons.

1 Like

You are very correct!
I have modified your code to this
combatFiringRange:p2=1.0, 15.0
so zombies will not be stuck out of reach of the players when they deployed their mortars.

I am currently testing if adding this would help:

mortar_controls{
  _override:b=yes
  _replicated:t="mortar__distanceLimit"
  mortar__distanceSensMult:r=100.0
  mortar__minTargetDistance:r=1.0
  mortar__defaultTargetDistance:r=10.0
  mortar__horzLimits:p2=-180.0, 180.0
  mortar__initDir:p2=0.0, 0.0
  mortar__distanceLimit:r=0.0
  mortar__lockedControl:b=no
  mortar__lockedProgress:r=1.0
}
1 Like

Ok it doesn’t fix the issue

However, i notice they can still move with the mortar-deployed animation.
image

The AI mortarman thing should be supported officially, because the patchnotes says that bots can deploy mortars and use them to attack targets

Let me investigate with the codes of the game

1 Like

have you tried to give them mortar ammo?

i know basic AI dont need that for weapons, but for special weapon they might need that.

note, that it appears there’s a difference between spawned Ai with weapons ( manually ) and generated ones from spawn.

1 Like

@DARDG did, and i copied his code.

It works perfectly fine in editor, its just not working in public game (even works in single player)

I believe they do need it. Zombies won’t shoot if you do not give them ammo, at least thats what the devs did - ammo was given

1 Like

ah. my bad.

i missed that part.

well, it’s probably one of many " templates " issues where these dont get replicated over custom servers.

2 Likes

It is not working now, now they dont even move in editor, i broke something.

Let me try tomorrow, i am too tired today

The sentry gun zombie already didn’t work, now another thing dont work.
I hope i can make this work, or else i would only have grave zombie and ai plane to be fearure of my breaking dead remake

1 Like

No, you didn’t break them, you just need to restart the editor and they will work.

1 Like

This is my last option. It contains unnecessary code - I thought maybe it will help. )))))
//////////////////
//Zombie mortart
//////////////////

zombie_mortar_rm_40_gun{
_use:t=“mortar_rm_40_gun”
gun_spread__maxDeltaAngle:r=9.0
gun_deviation__omegaDevInc:p2=0.35, 2.5
gun_deviation__movementDevInc:p2=0.0, 75.0
combatFiringRange:p2=40.0, 150.0
}

zombiexxx_mortar_rm_40_armored{
_use:t=“base_zombie_armored_soldier”
killLogName:t=“zombie/uber_armored”
human_weap__mortarMode:b=yes
human_weap__fastThrowExclusive:b=yes
mortar_mode__pivotOffsetPhysVarName:t=“pivot_offset”
mortar_mode__pivotOffsetPhysVarId:i=-1
mortar_mode__pivotOffsetInMortarMode:r=-0.3
_tracked:t=“human_weap__mortarMode”
_replicated:t=“human_weap__mortarMode”
beh_tree__enabled:b=yes
beh_tree__data__mortarAttackReq:t=“sub.mortarAttackReq”
beh_tree__data__personalOrder:t="sub.personalOrder"beh_tree__data__mortarAttackReq:t=“sub.mortarAttackReq”

“human_weap__weapTemplates:object”{
primary:t=“zombie_mortar_rm_40_gun”
secondary:t=“mp40_zombie_gun”
tertiary:t=“”
melee:t=“”
grenade:t=“”
special:t=“”
}

“human_weap__weapInfo:array”{

"human_weap__weapInfo:object"{
 reserveAmmoTemplate:t="mine_o822_mp_item"
  numReserveAmmo:i=100
}

"human_weap__weapInfo:object"{
 reserveAmmoTemplate:t="mp40_magazine"
  numReserveAmmo:i=100
}

"human_weap__weapInfo:object"{
}

"human_weap__weapInfo:object"{
}

"human_weap__weapInfo:object"{
}

}

_group{
_tags:t=“server”

"human_weap__template_deps_list:list<t>"{
  item:t="mine_o822_mp_item"
  item:t="zombie_mortar_rm_40_gun"
 item:t="mp40_magazine"
  item:t="mp40_zombie_gun"
}

}

“walker_agent__distanceToShootError:shared:array”{

"error:object"{
  distance:r=0.0
  min:p2=0.0, 0.0
  max:p2=0.5, 0.9
  maxEnd:p2=0.0, 0.0
}

"error:object"{
  distance:r=50.0
  min:p2=0.3, 0.7
  max:p2=0.6, 1.1
  maxEnd:p2=0.3, 0.6
}

"error:object"{
  distance:r=75.0
  min:p2=0.6, 1.3
  max:p2=2.0, 2.0
  maxEnd:p2=1.3, 1.1
}

"error:object"{
  distance:r=150.0
  min:p2=0.6, 1.3
  max:p2=2.0, 2.0
  maxEnd:p2=2.0, 2.0
}

}
}
////////
////////

I tried to write the weapon code differently, everything works, except for the multiplayer.

///////
type_89_mortar_zombie_gun{
_use:t=“type_89_mortar_gun”
_use:t=“gun_with_initial_ammo”
_use:t=“paid_loot_ressuply”
_use:t=“disable_item_drop”
item__template:t=“type_89_mortar_zombie_gun_item”
item__weapTemplate:t=“type_89_mortar_zombie_gun”
gun_spread__maxDeltaAngle:r=9.0
gun_deviation__omegaDevInc:p2=0.35, 2.5
gun_deviation__movementDevInc:p2=0.0, 45.0
combatFiringRange:p2=40.0, 100.0
stat_name:t=“mortar”
selWeaponVar:t=“type_89_mortar”

ownerAnimVars{
reye_offset_fwd0:r=-0.0
gun_offset_along:r=0.0
gun_offset_across:r=0.0
gun_offset_up:r=0.0
}

“gun__ammoHolders:array”{
item:t=“zombie_type_89_mortar_smoke_shell_item”
}
“gun__shells:array”{
shells:t=“gamedata/weapons/shells/type_89_mortar_smoke_shell.blk”
}
}

type_89_mortar_smoke_shell_phys{
_use:t=“type_89_mortar_smoke_shell_phys”
phys_obj_net_phys__blk:t=“gamedata/weapons/type_89_mortar_smoke_shell.blk”
}

zombie_type_89_mortar_smoke_shell_item{
_use:t=“type_89_mortar_smoke_shell_item”
item__template:t=“zombie_type_89_mortar_smoke_shell_item”
ammo_holder__templateName:t=“zombie_type_89_mortar_smoke_shell_item”
ammo_holder__ammoCount:i=10
requiresAmmoRefillsCount:i=10
item__proto:t=“gamedata/weapons/shells/type_89_mortar_smoke_shell.blk”
item__shell:t=“gamedata/weapons/shells/type_89_mortar_smoke_shell.blk”
}

type_89_mortar_zombie_gun_item{
_use:t=“item_gun”
_use:t=“type_89_mortar_zombie_gun”
collres__res:t=“type_89_mortar_collision”

_group{
_tags:t=“server”

"gun__initialAmmoHoldersCount:list<i>"{
  item:i=100

}

}
}
///////////
There is some code here that may not be needed, but it is also a working option.

In my new version they use two weapons. From 1 to 40-mp40…
From 40 to 150 they use a mortar and this diversifies the zombie mode )))).

combatFiringRange:p2=1.0, 15.0
This will allow us to use the mortar up to 15 m.

Yes, the zombie would not set down mortar before it come close.
But it still doesn’t work for multiplayer
Some server side code is missing, and that makes the zombie dont shoot

1 Like