How to restart a level? (SOLVED)


#1

How do I reload a collection that has already been loaded


#2

You unload it and then load it again.


#3

The method I use is to send a restart message to my controller script that unloads the proxy and sets “self.restart = true”

Then check the boolean in the “proxy_unloaded” message to reload it from there:

--check if proxy should reload itself
if message_id == hash("proxy_unloaded") then
  if self.restart == true and sender.fragment == hash("myproxy") then
    msg.post("/proxies#myproxy", "load")
    self.restart = false
  end
end

#4

Thanks guys