Page 1 of 1
How can I start preview mode with no items (start over)?
Posted: Wed Jan 07, 2015 6:25 am
by rovaira
Hello.
How can I start preview mode with no items in preview mode? It keeps giving me my items I got from last time I played my own dungeon. I need to retest to see how hard/easy it is. Thank you.
Re: How can I start preview mode with no items (start over)?
Posted: Wed Jan 07, 2015 7:12 am
by cameronC
I believe the only way is to exit to main menu and click Dungeon Editor and load your mod again. I'm, generally, not a fan of it either.
Re: How can I start preview mode with no items (start over)?
Posted: Wed Jan 07, 2015 8:55 am
by JohnWordsworth
I guess you could add a script entity that simply runs through each slot for each champion and destroys every item they are carrying? Should only be a few lines of Lua code.
You might need to write your code in a function and use delayedCall with a time of 0.01 seconds or something to make it work as I think the inventory is reset after all script entities are run.
I am on my phone at the moment, but something like this should work...
Code: Select all
function clearInventory()
for i=1,4 do
local champ = party.party:getChampion(i);
for j=1,32 do
local e = champ:getItem(j);
if e ~= nil then
champ:removeItem(e);
e.go:destroy();
end
end
end
end
delayedCall(self.go.id, 0.01, "clearInventory")
Re: How can I start preview mode with no items (start over)?
Posted: Wed Jan 07, 2015 10:34 am
by Mal85
Throw all your items on the ground then just click the play button again to reload the session in the editor. The items on the ground will be gone, but if your also looking to reset the experience and levels I just reload the editor.
Re: How can I start preview mode with no items (start over)?
Posted: Wed Jan 07, 2015 12:24 pm
by TheStoryteller01
I use a script on a floor triger under the starting position that empties the inventory - but I still have to restart the editor as soon as it gets too dark to test the environment : /
Re: How can I start preview mode with no items (start over)?
Posted: Wed Jan 07, 2015 2:34 pm
by JohnWordsworth
By "too dark", I presume you are just referring to the time of day? If you have the console enabled, you can change the time of day using...
Re: How can I start preview mode with no items (start over)?
Posted: Wed Jan 07, 2015 10:54 pm
by Isaac
I wish the editor had a check-box that enables or disables this new behavior. It does have its benefits, but there are times when one wishes to turn it off.
Re: How can I start preview mode with no items (start over)?
Posted: Wed Jan 07, 2015 11:04 pm
by Batty
I agree, this feature seems bizarre to me and would be terrific if it could be disabled.