I'm looking for codelines/script lines that make assets like a castle_candle_holder and a dm_painting to disappear to a different location when pressing a button. Basically something like setworldposition when you have pressed the button. and then when you press a 2nd button i want the script to be disabled so that they get back to their original position.
In this particular case I want them to change position to for example a floor lower so that they're under the ground and thus out of sight. And that they're instantly replaced by hellish equivalents.
a white candle changes positions with a red one. A painting of a cheeky fellow is exchanged by the painting of a vampire
A chandelier starts turning and other spooky effects suddenly activate etc...
Also scripts in my mod are instantly and permanently enabled like for example this script:
Code: Select all
dungeon_stand_candle_center_1:setWorldPosition(vec(7.5,0,79.8,0))
Is there a way to keep this script disabled until it's triggered?
I suppose i have to make something like this?
Code: Select all
function switch()
dungeon_stand_candle_center_1:setWorldPosition(vec(7.5,0,79.8,0))
end
And then attach the button to it?
What are my options? or am i just grasping at straws here?
Or is there a way/script to destroy assets like a castle candle holder at a certain location and spawn a DARKcastle candle holder at a certain location when clicking/triggering a button.