Morbane wrote...
Nice work kamal_
It would be cool to have a chest flash (or something) when it is opened...
If I get you right - you're saying that might be possible?
? Chests have always been able to do that with the onOpen event.
Let me try again, since it's kind of hard to explain and I didn't do a good enough job.
SLS2 does some things in addition to just turning lights and sounds on or off based on various conditions. What's relevant here is it can turn on/off a visual effect, and it can swap out a placeable for another one. Slayster included a number of prefabs in the SLS2 package. Some of these take advantage of the turning on/off of vfx (such as the braziers, which get a fire effect when you light them). Others swap out on and off versions of a placeable, such as the ghost lights, where there is a different placeable for when the light is on.
There are pc usable placeables that turn on/off the vfx (tiki torches and such), and there pc usable dual state placeables. However, there are no placeables in the pack that have all three abilities: are pc usable, turn on/off vfx, and are dual state.
Fortunately Slayster includes a readme that covers making new "light fittings", what Slayster calls any base placeable used with the system. Since there were no fittings that had the all three abilities, I wanted to make some. Unfortunately the readme is incorrect. One thing I discovered was that it says you can remove any local variables that won't be use (hours to turn on/off automatically in my case). The on/off variables turned out to be necessary despite my not being interested in making a light with on/off hours. Without the variables, the placeable did not behave properly (I forget exactly if they didn't switch the light or what exactly, but they didn't work).
Long bunch of testing rendered short: The placeable is usable, and it properly switches out for it's off state, but turning the placeable off does not turn off the vfx, what actually happens is the vfx is turned off and immediately back on. If you have the placeable start in the off state, it correctly starts without the vfx, and the vfx correctly starts and the placeable switches when you turn it on, turning it back off does not turn off the vfx. If the placeable starts on, turning it off also does not remove the vfx. Since if you remove the placeable swapping part, the vfx goes on and off correctly when used, there's the bug.
I'm getting the vfx being created on the off placeable even whe I remove variable on that placeable for the vfx. It shouldn't be playing the vfx in the off state, because no vfx is assigned to the off state.
Modifié par kamal_, 03 août 2012 - 11:05 .