Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local specialZombieManager = require "SpecialZombies/Manager";
- local function makeNoise(zombie)
- local modData = zombie:getModData();
- if modData.shrieked then
- return;
- end
- local emitter = zombie:getEmitter();
- if not emitter then
- print("No emitter");
- return;
- end
- addSound(nil, zombie:getX(), zombie:getY(), zombie:getZ(), 250, 250);
- emitter:playSound("Shrieker_Shriek", zombie);
- print("Shrieking!");
- modData.shrieked = true;
- end
- local function isShrieker(zombie)
- local modData = zombie:getModData();
- return modData.specialZombie;
- end
- local function Shrieker_Update(zombie)
- local modData = zombie:getModData();
- if not modData.ZombieVariety then
- print("No ZombieVariety set");
- modData.ZombieVariety = {};
- end
- for prop, value in pairs(specialZombieManager) do
- print(prop);
- end
- return;
- if not specialZombieManager.types.Shrieker then
- specialZombieManager.importSpecialZombieStatsByType("Shrieker");
- end
- specialZombieManager.rollSpecialZombieProbability(zombie);
- if modData.ZombieVariety.applySpecial and not modData.ZombieVariety.applied then
- specialZombieManager.applySpecialZombieStats(zombie, modData.ZombieVariety.type);
- end
- local target = zombie:getTarget();
- if not target then
- return;
- end
- -- Shriek in the first 5 seconds a player target is spotted
- if instanceof(target, "IsoPlayer") then
- print("Shriek at player " .. target:getUsername());
- --makeNoise(zombie);
- end
- end
- Events.OnZombieUpdate.Add(Shrieker_Update);
Advertisement
Add Comment
Please, Sign In to add comment