Modme Forums

Custom Player & Zombie Teleport Script Help

Game Modding | Call of Duty: Black Ops 3 | Scripting


ModmeBot:

Thread By: Zombeast250
moving this help request from another topic

so i am using uptowns shadows of evil teleporters edited help by abnormal and they work great only i have to teleport zombies to a destination close to the player i am using this script but the zombies wont respawn at the struct after i teleport

i get no errors
i have:

player_teleporter_init();
under : function main() in mapname.gsc


and at the bottom this:
function player_teleporter_init()
{
	player_tp = GetEntArray( "teleport_player", "targetname" );
	for( i = 0; i < player_tp.size; i++ )
	{
		player_tp[i] thread player_teleport();
	}
}

function player_teleport()
{
	destination = GetEnt( self.target, "targetname" );
	while(1)
	{
		self waittill( "trigger", player );
		
		player SetOrigin( destination.origin );
		player SetPlayerAngles( destination.angles );
		
		wait(0.05);
		
		PlaySoundAtPosition( "beast_teleplayer1", player.origin );  // sound made when teleporting
		
        zombies = GetAiSpeciesArray( "axis", "all" );
        zombie_destinations = struct::get_array("zombie_destination","targetname");
        for(i=0;i<zombies.size;i++) {="" rand="RandomIntRange(" 0,="" zombie_destinations.size="" );="" zombies[i]="" setorigin(="" zombie_destinations[rand].origin="" );="" zombies[i]="" setplayerangles(="" zombie_destinations[rand].angles="" );="" wait(0.25);="" time="" between="" zombie="" teleportation.="" don't="" put="" 0,="" as="" i'm="" worried="" it="" could="" cause="" errors.="" }="" }=""></zombies.size;i++)>


ModmeBot:

Reply By: Abnormal202
Are you saying it doesn't teleport the zombies when it does this?


ModmeBot:

Reply By: Zombeast250

Abnormal202
Are you saying it doesn't teleport the zombies when it does this?

so the teleporter teleports the player and the sound plays perfect no errors but after the player teleports the zombies do not teleport to the script_struct with a targetname/zombie_destination they take the long way back to the player


so if it helps i have 3 teleporters running off that script and all work the same for teleporting the player and not the zombies
thanks for the help


ModmeBot:

Reply By: Abnormal202
Sorry If that ain't working I don't know what to do. I'm not even sure you would want that to work though; cause if it's a shadows of evil style teleporter players could easily take advantage of it teleporting the zombies everytime they enter it. You could check out this tutorial, only problem is it only works if the zombies have a theoretical path to the players.


ModmeBot:

Reply By: Zombeast250
so this style teleporter would work for me as the zombies teleport into a room beside the player teleport room so they would have to face them after they teleport and fight them to get out of the room they teleport to i am going to delete the other 2 teleporters an try again with 1

if you are unable to think of anything else that would make this work then thank you for all the help Abnormal202 on this subject and others