Manipulating an item when it's sitting on an altar

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
Scotty
Posts: 69
Joined: Fri Nov 07, 2014 2:59 pm

Manipulating an item when it's sitting on an altar

Post by Scotty »

If I have branch_1 sitting on the ground and branch_2 sitting on an altar (surface component) and run this:

Code: Select all

print (branch_1.id)
print (branch_2.id)
branch_1.id will execute properly but branch_2.id will chuck an error. I guess this is because it doesn't technically exist in the world like branch_1 does?

How would I go about moving branch_2 off the altar? Surface component doesn't appear to have any way to remove an item.
User avatar
Prozail
Posts: 158
Joined: Mon Oct 27, 2014 3:36 pm

Re: Manipulating an item when it's sitting on an altar

Post by Prozail »

you should be able to grab it through findEntity("branch_2") or by looping through the altar_1.surface:contents()
Post Reply