Zebon Posted 11 hours ago Posted 11 hours ago 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 10 hours ago Posted 10 hours ago 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 10 hours ago Author Posted 10 hours ago 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 10 hours ago Solution Posted 10 hours ago 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 9 hours ago Author Posted 9 hours ago 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