Page 1 of 1
How can we make disappear/deleting/move an element?
Posted: Thu Sep 13, 2012 7:12 pm
by Starnice
Hello.
Can we make disappear an element of scenery with a script?
I tried to move it instead of deleting it.
But, when I try to move through the script, I get an error on a "read only value".
Thank You!
Re: How can we make disappear/deleting/move an element?
Posted: Thu Sep 13, 2012 9:34 pm
by Starnice
I realize that I am not very clear. (sorry for my english)
An example of what I want to move / remove if possible : temple_ceiling_lamp
Re: How can we make disappear/deleting/move an element?
Posted: Thu Sep 13, 2012 9:39 pm
by Lmaoboat
I don't think that's possible just yet, but I think you could use an fx entity and turn it on/off. Though come to think of it, there was that light that turned on when you grab that weapon to slay the final boss.
Re: How can we make disappear/deleting/move an element?
Posted: Fri Sep 14, 2012 6:32 am
by Starnice
I can not do it yet but thank you for the suggestion!
Re: How can we make disappear/deleting/move an element?
Posted: Sat Sep 15, 2012 4:50 pm
by Starnice
Really, I can not do it.
I created an item "FX" (ID : fx_1) and a plaque, and a script I linked to the plate.
Code: Select all
function eclairage()
fx_1:setLight(0, 0, 1, 10, 2, 20, false)
end
I get : attempt to index global 'fx_1' (a nil value)
Anyone know how to rectify this error? Or known to have a fx 'ON' from the start of the game?
Re: How can we make disappear/deleting/move an element?
Posted: Sat Sep 15, 2012 7:35 pm
by Starnice
Okay, a simple "temple_ceiling_lamp_3: deactivate ()" is enough to turn off the light ...