Modme Forums

My script doesn’t work

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


Pepergogo:

Hi, so I'm trying to show and hide a door. Basically when you touch the trigger_multiple, a door will show, and after 2 min the door dissapear. The problem is, the script doesn't do anything :(
I'm using script_multiple, script_model and script_brushmodel so I think that's not the problem. Here's my script:

//Boss fight
level thread boss_fight();



//Boss Fight
function boss_fight()
{
    trig = GetEnt("boss_fight_trig","targetname");
    bfdoor = GetEnt("bf_door", "targetname");

    //Hide door
    bfdoor Hide();

    trig waittill("trigger",player);

    //Boss fight
    bfdoor Show(); //Show door
    level flag::set( "spawn_zombies" ); //Start zombie spawn
    player playsound("music_BW"); //Start music
    wait(120); //Fight time
    bfdoor Delete(); //Delete door
}

Any help would be really really appreciated :(


Magicman:

So what exactly is the problem? Does the door never show up? Never delete? or what?


Pepergogo:

So what exactly is the problem? Does the door never show up? Never delete? or what?

Oh sorry
Yeah, the door and the brush are there but the trigger never activates because after the 2 minutes, nothing happen.
The door and the brush are still there. I'm trying to make them dissappear after the 2 minutes


Magicman:

Oh sorry
Yeah, the door and the brush are there but the trigger never activates because after the 2 minutes, nothing happen.
The door and the brush are still there. I'm trying to make them dissappear after the 2 minutes


I implemented that code exactly as you had it and it worked for me. I'm assuming either you're not waiting the full two minutes or there's a typo in one of the targetnames


Pepergogo:

I implemented that code exactly as you had it and it worked for me. I'm assuming either you're not waiting the full two minutes or there's a typo in one of the targetnames

Really? Awesome! :D
We'll I'm gonna try without the song and check the typo
Thanks


Magicman:

Really? Awesome! :D
We'll I'm gonna try without the song and check the typo
Thanks


No problem. Hope it works


Pepergogo:

No problem. Hope it works

Yeap, works fine 😁