Game Modding | Call of Duty: Black Ops 3 | Scripting
blink-420:
So I'm trying to spawn a horde of zombies when the player touches a trigger_multiple but cant seem to get it working correctly. This is what I have written so far
function street_horde_zombie()
{
boss_trigger1 = GetEnt("boss_trigger1", "targetname" );
boss_trigger1 waittill("trigger");
spawner_zom = GetEnt("spawner_zom","targetname");
while(1)
{
zombie = zombie_utility::spawn_zombie( spawner_zom );
wait(0.5);
zombie = zombie_utility::spawn_zombie( spawner_zom );
wait(0.5);
zombie = zombie_utility::spawn_zombie( spawner_zom );
wait(0.5);
zombie = zombie_utility::spawn_zombie( spawner_zom );
wait(0.5);
zombie = zombie_utility::spawn_zombie( spawner_zom );
wait(0.5);
zombie = zombie_utility::spawn_zombie( spawner_zom );
wait(0.5);
zombie = zombie_utility::spawn_zombie( spawner_zom );
wait(2);
}
}
It seems to force spawn zombies on random structs but I need to spawn them on specific structs any help appreciated !!
eDeK:
Put structs with the targetname "my_specific_structs".
Put the USING if you need:
#using scripts\zm\_zm_spawner;
etc...
function street_horde_zombie()
{
x_structs = struct::get_array( "my_specific_structs", "targetname" );
boss_trigger1 = GetEnt("boss_trigger1", "targetname" );
boss_trigger1 waittill("trigger");
foreach( x_struct in x_structs )
{
x_struct thread xtra_zombie( x_struct );
}
}
function xtra_zombie( x_struct )
{
dig_zombie = SpawnActor("actor_spawner_zm_usermap_zombie", x_struct.origin, x_struct.angles, "", true, true);
dig_zombie zm_spawner::zombie_spawn_init( undefined );
dig_zombie._rise_spot = x_struct;
dig_zombie.is_boss = 0;
dig_zombie.gibbed = 1;
dig_zombie.health = 150;
dig_zombie.in_the_ground = 1;
dig_zombie.ignore_enemy_count = 0;
dig_zombie.ignore_nuke = 0;
dig_zombie.no_powerups = 0;
dig_zombie.no_damage_points = 0;
dig_zombie.deathpoints_already_given = 0;
dig_zombie.script_string = "find_flesh";
dig_zombie zm_spawner::do_zombie_spawn();
}
I dont test it, but maybe works.