Game Modding | Call of Duty: Black Ops 3 | Scripting
Pepergogo:
Hi, I'm trying to use a simple script I made, where when you touch the trigger, a countdown begin with a song and after that a door dissapear. The problem is, the script doesn't do anything.
Here's the script:
//After zm_usermap::main();
//Boss fight
level thread boss_fight1();
level thread boss_fight2();
level thread boss_fight3();
//At the bottom of the gsc
//Boss Fight
function boss_fight1()
{
trig = GetEnt("bf_trig1","targetname");
bfdoor = GetEnt("bf_door1", "targetname");
trig SetHintString("All players must be inside");
trig SetCursorHint("HINT_NOICON");
trig waittill("trigger",player);
//Boss fight
level flag::set( "spawn_zombies" ); //Start zombie spawn
player playsound("bf1"); //Start music
wait(150); //Fight time
bfdoor Delete(); //Delete door
}
function boss_fight2()
{
trig = GetEnt("bf_trig2","targetname");
bfdoor = GetEnt("bf_door2", "targetname");
trig waittill("trigger",player);
//Boss fight
//level flag::set( "spawn_zombies" ); //Start zombie spawn
player playsound("bf2"); //Start music
wait(210); //Fight time
bfdoor Delete(); //Delete door
}
function boss_fight3()
{
trig = GetEnt("bf_trig3","targetname");
bfdoor = GetEnt("bf_door3", "targetname");
trig waittill("trigger",player);
//Boss fight
//level flag::set( "spawn_zombies" ); //Start zombie spawn
player playsound("mind"); //Start music
wait(240); //Fight time
bfdoor Delete(); //Delete door
}
I already try to change the "trig" name in each function and also I'm using "script_model" and "script_brushmodel". Also I already wait the time is suppose to be but doesn't happen. When I touch the trigger, the song doesn't start and the door doesn't dissapear after the time it says.
Any help would be really appreciated :(
Drae77:
have you tried?
function boss_fight2()
{
trig2 = GetEnt("bf_trig2","targetname");
bfdoor2 = GetEnt("bf_door2", "targetname");
trig2 waittill("trigger",player);
//Boss fight
//level flag::set( "spawn_zombies" ); //Start zombie spawn
player playsound("bf2"); //Start music
wait(210); //Fight time
bfdoor2 Delete(); //Delete door
trig2 Delete();//Delete trigger
}
function boss_fight3()
{
trig3 = GetEnt("bf_trig3","targetname");
bfdoor3 = GetEnt("bf_door3", "targetname");
trig3 waittill("trigger",player);
//Boss fight
//level flag::set( "spawn_zombies" ); //Start zombie spawn
player playsound("mind"); //Start music
wait(240); //Fight time
bfdoor3 Delete(); //Delete door
trig3 Delete();//Delete trigger
}
Pepergogo:
Yeah, I tried change the name from the trig and door to trig1, trig2 and so on, but nothing happen :(
And Delete(); the trigger didn't add but I have to get it work first so I can delete it after :(