• Disable Game Over?
    3 replies, posted
I hate that whether I kill Alyx, Barney, or when I fall from a cliff or drive underwater with jeep etc. screen fades in black with a message "gameover_something". and then restart. Occurs in default HL2 maps. So is there a way to disable this from happening with Lua?
Pretty sure it's a maptrigger. Not sure which one though. But you could simply search for that trigger and delete it upon mapstart. [b][url=http://wiki.garrysmod.com/?title=Ents.FindByName]Ents.FindByName [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] [b][url=http://wiki.garrysmod.com/?title=Ents.FindByClass]Ents.FindByClass [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] [b][url=http://wiki.garrysmod.com/?title=Entity.Remove]Entity.Remove [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] Edit: Sorry, forgot the hook. That would be: [b][url=wiki.garrysmod.com/?title=Gamemode.InitPostEntity]Gamemode.InitPostEntity [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] If the ent would be called "gameendmaybe" you would do it like that: Ents.FindByName("gameendmaybe"):Remove();
d2_coast_07 uses these to end the game So try something like [lua] Ents.FindByName("fall_trigger"):Remove(); Ents.FindByName("game_over"):Remove(); Ents.FindByName("end_fade"):Remove(); Ents.FindByName("reload"):Remove(); [/lua] Might be different each map though.
It works now, thank you! To kill vital allies: [lua] for _,v in ipairs(ents.FindByName("loadsaved_*")) do v:Remove() end [/lua]
Sorry, you need to Log In to post a reply to this thread.