Hello! I'm trying to make a realistic zombie campaign. When a living unit gets hit from a walking corpse it turns into a walking corpse. This mechanic works, however the new walking corpse can move and attack immediately and that is not desired. I read the wiki abot unit attributes, so I tried to set moves to 0 and attacks_left to 0 without success. Here is my code:
Code:
# when Zombie attacks[event]name=attacker hitsfirst_time_only=no[filter]type=Walking Corpse, Soulless[/filter][filter_second][not]trait=undead,elemental[/not][/filter_second][store_unit][filter]id=$second_unit.id[/filter]kill=yesvariable=infected[/store_unit]{VARIABLE infected.side $unit.side}{VARIABLE infected.type "Walking Corpse"}{VARIABLE infected.hitpoints $unit.max_hitpoints}{VARIABLE infected.max_hitpoints $unit.max_hitpoints}{VARIABLE infected.canrecruit no}{VARIABLE infected.movementpoints 0}{VARIABLE infected.attacks 0}[unstore_unit]variable=infected[/unstore_unit][redraw]side=1[/redraw][/event]# When Zombie makes hit during defense[event]name=defender hitsfirst_time_only=no[filter][not]trait=undead,elemental[/not][/filter][filter_second]type=Walking Corpse, Soulless[/filter_second][store_unit][filter]id=$unit.id[/filter]kill=yesvariable=infected[/store_unit]{VARIABLE infected.side $second_unit.side}{VARIABLE infected.type "Walking Corpse"}{VARIABLE infected.hitpoints $second_unit.max_hitpoints}{VARIABLE infected.max_hitpoints $second_unit.max_hitpoints}{VARIABLE infected.canrecruit no}{VARIABLE infected.moves 0}{VARIABLE infected.experience 0}{VARIABLE infected.attacks_left 0}[unstore_unit]variable=infected[/unstore_unit][redraw]side=1[/redraw][/event]
Statistics: Posted by Samaximus — Today, 9:49 am