Page 1 of 1
How to update placement of a spawned item?
Posted: Thu Dec 20, 2012 9:59 am
by Ixnatifual
Say you have spawned an item somewhere but want to change its position through scripting rather than with a teleporter. Ie. update x, y, facing and level. How would you do that?
Re: How to update placement of a spawned item?
Posted: Thu Dec 20, 2012 10:07 am
by Xanathar
Shameless plug:
if you get grimq, there are are loadItem, saveItem and copyitem methods you can use to clone the item at another location and then destroy the original.
I'm in a very busy day (business meeting of many hours, leave the meeting early to go to the xmas show of my little daughter, go home and buy cake to celebrate her birthday with all the relatives

) so I'm not able to give you a complete solution, sorry.
Also: those methods don't work for scrolls with pictures (the only case where they don't work afaik). This will be fixed thanks to Grimrock beta new features.
Re: How to update placement of a spawned item?
Posted: Thu Dec 20, 2012 4:19 pm
by Komag
I don't know how to do it other than deleting that item and creating a new one where you want it. 1.3.6 allows you to detect any scroll image for that issue as well.
Re: How to update placement of a spawned item?
Posted: Thu Dec 20, 2012 10:43 pm
by Ixnatifual
I reworked my script so the item isn't spawned until it knows where to place it.