Please may give me the script of a zombie kamikaze for people who understand lua, I do not think it difficult for them ,
remember it is for the zombie 1.15 simonas
I just need the dying zombie spawns gut bombs
I hope your answers and thanks in advance.
Whenever a kamikaze dies, die certainly would do the job. In the die hook, firstly you must create a "for" loop which we'll index it to i and its value as 1, 360 (we'll use it as rotation in degrees). Afterwards, use parse to trigger spawnprojectile. To spawn gut bombs, its ID projectile type is 86 (for further information about spawnprojectile parameters, check the reference). If you want a direct example then look at this line of code below:
1
parse("spawnprojectile " .. id .. " 86 " .. player(id, "x") .. " " .. player(id, "y") .. " 25 " .. i)
As you can see in the last part where's .. i , it's the index of "for" loop which describes the rotation in degrees of those projectiles as explained above. Now, half of this work is done with the exception of how to implement it in SQ' Zombie Plague script. Unfortunately, I cannot give you a solution into this as I'm not really savvy on how Simonas' zombie script works (judging from coding terms).
Maybe try to check for a file named zp_func.lua or something similar, check the line where it has the function of die and try somehow to make a statement if the zombie is truly kamikaze and if he's dead then the function will trigger. Blind guess. good first intenatre I get out normally with the normal functions ... to see if someone tells me I did wrong
1
2
3
4
addhook("die","die")
function die(id)
parse("spawnprojectile " .. id .. " 86 " .. player(id, "x") .. " " .. player(id, "y") .. " 25 " .. i)
end
Admin/mod comment
above all forgiveness , I know what hise wrong but I put mie part and try to improve with the issue of lua always read tutorials and stuff, but still not handling well the basics
But thank you very much
Thanks for the patience
I will try to improve ! Admin/mod comment
You posted same phrase twice. Removed! Also, seems like you're using a translator. /ZxC A little modification:
1
2
3
4
5
6
7
8
9
addhook("die","dieHook")
function dieHook(id)
if player(id, "team") == 1 then
for i = 0, 7 do
parse("spawnprojectile " .. id .. " 86 " .. player(id, "x") .. " " .. player(id, "y") .. " 25 " .. i*45)
end
end
end
(checks if the player is a zombie and spawns 8 projectiles instead of 360)