Is it a one time event?
Is the item that you're placing 1 specific item?
Does the placed item have to swap back afterwards?
If it doesn't need to be swapped back and it's a one time item, you can probably do it with 2 simple destroy - spawn scripts with a counter decrement activating the 2nd destroy and spawn on pedestal 2 script giving the illusion that the items swapped places.
It's clunky, but it might get the job done for now until someone can come up with something more advanced
What I usually do is make super simple scripts I already know.
Here is some code from my dungeon. Place skulls on pedestals and they appear on the wall, the counter decrement activates a counter that activates a 2nd script spawning the crown.
Code: Select all
function Quest2()
local s = g1_dark_temple_pedestal_1.surface
for _,e in s:contents() do
if e.go.name == "fancy_skull" then
e.go:destroy()
playSound("secret")
counter_2.counter:decrement()
ud_alcove_3.surface:addItem(spawn("fancy_skull").item)
end
end
end
Code: Select all
function Quest3()
local s = g1_dark_temple_pedestal_2.surface
for _,e in s:contents() do
if e.go.name == "fancy_skull" then
e.go:destroy()
playSound("secret")
counter_2.counter:decrement()
ud_alcove_6.surface:addItem(spawn("fancy_skull").item)
end
end
end
Code: Select all
function habba()
dm_surface_throne_1.surface:addItem(spawn("g1_treasure_golden_crown").item)
end
Screenshots included
https://ibb.co/e2K7PT
https://ibb.co/hrPcr8