Hi all,
I have an annoying problem: I have a script for an event that takes place in the videogame Left 4 Dead 2 (a videogame that uses the Squirrel language) which activates an overlay once triggered. The problem is that, when activated and showed on screen, if all the players die and have to restart the map, the overlay doesn't turn off, it stays on.
Here's the code lines that I have for turning off the overlay, if you could please let me know what I have to add / change to turn it off when the map is restarted
Quote:// Store the name of our overlay.
PipeBombsOverlay <- null;
function OnGameEvent_round_end( params )
{
TurnOffOverlay();
}
function OnGameEvent_versus_round_end( params )
{
TurnOffOverlay();
}
function TurnOffOverlay()
{
// Round ended. Make sure we turn the overlay off.
printl("Round ended, turn off the overlay" );
EntFire( PipeBombsOverlay.GetName(), "stopoverlays");
}
Thank you all