Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
Anyone know how to make restart game
Example:
If all player hero died, the command will show it.
Mission Fail, You want play again?
Write -restart to restart the game.
All hero will revive comeback but lost all items.
Well it's all about triggering it. When they choose that they want to restart, just set all the variables and such to their original state. (A little more complicated than that )
Well it's all about triggering it. When they choose that they want to restart, just set all the variables and such to their original state. (A little more complicated than that )
You need to record the starting state of the map. For units this can be done by picking every unit on the map at map initialization and then recording their state inside various arrays, incrementing the index used for each different unit. When you reset you remove all units on the map, and then use the array to recreate them in their initial state.
All variables related to progress also need to be reset to initial values. This includes reinitializing all unit variables to represent the new replacement units.
Be warned that leaks can only be cleared by starting a new map session. To avoid performance problems in the long run it is very important that one leaks as little as possible.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.