Zebon Posted Monday at 08:05 AM Posted Monday at 08:05 AM hello I would like to ask for some help! Can anyone make a map_restart script? It would be very important! only multiplayer
NAB622 Posted Monday at 08:28 AM Posted Monday at 08:28 AM We'll need a little bit more information than that. Are you talking about ICARUS scripts? What is the full context of what you are trying to do?
Zebon Posted Monday at 08:56 AM Author Posted Monday at 08:56 AM I want a deathscript for an NPC. When it dies, restart the map. In short, the script should start a command on the server. example: maprestart.ibi should be in such a file, but I can't do it. I could use gtk radiant to build the script in the npc. I just don't know how to script.
Solution NAB622 Posted Monday at 09:07 AM Solution Posted Monday at 09:07 AM What you want to do is very easy in theory, however it risks a crash on the game server so I do not recommend it. Â Regardless, here's how you can do it... Create a target_level_change, and set the mapname value to the name of the map. Set a targetname on this entity as well. When fired, this will effectively reload your map. (This function is bugged and has a chance to crash the game server!) In multiplayer, all scripts on an NPC are terminated when they die, including the deathscript, which makes no sense. Instead, try setting NPC_target, and give it the targetname of your target_level_change. Â Assuming none of these items are bugged, the level should now reload the map when the specified NPC dies. If you would like a delay before the reload, use a target_delay in between the NPC and the target_level_change. If you would like printed messages to the players before the level change, use a target_print. Zebon likes this
Zebon Posted Monday at 10:15 AM Author Posted Monday at 10:15 AM en I think I pretty much understand. I'll try! Thanks!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now