Page 1 of 1
[FIXED (2.1.15) - BUG] Item spawning directly to champion
Posted: Wed Nov 05, 2014 1:14 am
by NutJob
....
Re: I need to squash this problem once and for all
Posted: Wed Nov 05, 2014 2:09 am
by NutJob
Also, if anyone tries to reproduce this "bug" (is it?, maybe not) remember to look around. The item will be there but could be facing another way because the item will drop the direction of whatever you used to trigger your script.
And if you can reproduce this, please, do tell, here. If you can't, still please do tell and call me a Butt. It's en vogue... sorry I'm a time traveler.
Re: I need to squash this problem once and for all
Posted: Wed Nov 05, 2014 2:29 am
by Batty
I'm able to reproduce both cases so you're not losing it...yet
Funny thing is if you put:
Code: Select all
party.party:getChampion(1):insertItem(1, spawn("dagger").item)
in a script that executes when you start, you get a dagger on the floor but no dagger in hand...weird. The script has to be triggered to get the double dagger result.
I did this:
Code: Select all
d = spawn("dagger", party.level, party.x, party.y, party.facing, party.elevation, "dagger_x")
party.party:getChampion(1):insertItem(1, d.item)
d:destroy()
and I got a dagger in hand and no dagger on the floor. This is strange though.
Re: I need to squash this problem once and for all
Posted: Wed Nov 05, 2014 2:32 am
by NutJob
Batty wrote:I'm able to reproduce both cases so you're not losing it...yet
Funny thing is if you put:
Code: Select all
party.party:getChampion(1):insertItem(1, spawn("dagger").item)
in a script that executes when you start, you get a dagger on the floor but no dagger in hand...weird. It has to be triggered to get the double dagger result.
I did this:
Code: Select all
d = spawn("dagger", party.level, party.x, party.y, party.facing, party.elevation, "dagger_x")
party.party:getChampion(1):insertItem(1, d.item)
d:destroy()
and I got a dagger in hand and no dagger on the floor. This is strange though.
I believe *our* scripts are loaded in before they have access to top-level global functions like spawn(). I believe this is why. And yes, I put the above examples in a script on a timer to execute after the game is fully loaded.
Edit: and to follow up this reply, yes, destroy() does clear up the problem of
duplicates but I read a few times on LoG1 forums to never destroy the item once given to a champion. Unclear why (mostly because I forgot and now I can't find these threads) but it was stressed quite extensively.
Re: I need to squash this problem once and for all
Posted: Wed Nov 05, 2014 7:59 am
by petri
There seems to be something wrong here. I'll dig deeper into this later today.
Btw. You can give nil instead of the id to spawn() and it will automatically created a unique id. This is actually recommended.
Re: I need to squash this problem once and for all
Posted: Wed Nov 05, 2014 9:25 am
by petri
Ok, ghost item bug confirmed. Will be fixed in 2.1.15.
Re: I need to squash this problem once and for all
Posted: Wed Nov 05, 2014 9:51 am
by Doridion
Thanks petri, can finally give the [BUG] mark

Re: I need to squash this problem once and for all
Posted: Wed Nov 05, 2014 3:25 pm
by NutJob
Thank you for the upcoming fix and my
weird tutorial directions.