this is a script i made for a zombie that would randomly spawn in place of a normal zombie and teleport after every few seconds a few meters away from where it was. nothing too spectacular but it can throw people off guard if one spawns in the middle of a horde.
for this tutorial i will be using the model called "c_54i_cqb_fullbody" for the zombie, if you want a different one change this at any point in the tutorial to your own model.
first go into your maps zone file and add
Code Snippet
Plaintext
xmodel,c_54i_cqb_fullbody
then go into your mapname.gsc and add
Code Snippet
Plaintext
#precache("xmodel", "c_54i_cqb_fullbody");
above main
then place this
Code Snippet
Plaintext
level.teleport_zombie_reap_dist = 190; //teleporting distance level.teleport_zombie_reap_time_min = 3; //minimum time to teleport level.teleport_zombie_reap_time_max = 3; //max time to teleport (time to teleport random between min and min + max) level.teleport_zombie_reap_health_multiplier = 3; //health modifier, this many times more health than a normal zombie level.teleport_zombie_reap_percent = 15; //spawn rate percent, this many out of 100 will become teleporters level thread reap_special_zombies();
Another thing ive noticed after playing with these guys further is their teleportation function is not limted to a player volume ( teleporting outside zones and even though monster clipping ). stairs and floors/levels they can even temporally teleport in the air, skipping past traversals and nodes.
I really think these guys are valuable, this is a really good idea, nice work, and thanks for looking into fixing them up.