Undocumented game.canplaceentity changes?
Posted: Tue Mar 17, 2015 1:46 pm
So I'm trying to use game.canplaceentity to check whether an item-on-ground entity can be placed. It uses the name and position arguments, but when I test it, I always get this error: No such node (stack)
Which is confusing to me, since stack is never specified for canplaceentity (though it is for createentity on the next line). The name parameter is simply "item-on-ground", and the position table I pass to it is just a pair of xy coordinates. Even when I put a pair of coordinates directly into the table, like so:
It still gives me that error. I'm at a loss here, the release notes and the wiki say nothing about a stack parameter for canplaceentity. Can anyone shed light on this?
And should I mark the item-on-ground as player/neutral force when it's created? Would it affect anything if I left it as the default (enemy) value?
Which is confusing to me, since stack is never specified for canplaceentity (though it is for createentity on the next line). The name parameter is simply "item-on-ground", and the position table I pass to it is just a pair of xy coordinates. Even when I put a pair of coordinates directly into the table, like so:
Code: Select all
if game.canplaceentity{name = "item-on-ground", position = {x = -29.14, y = -9.75}} then
And should I mark the item-on-ground as player/neutral force when it's created? Would it affect anything if I left it as the default (enemy) value?