Contrary to reports, MTS is NOT compromised, and it IS safe to download from here. For more information, see this thread.
Quick Reply
Search this Thread
Alchemist
Original Poster
#1 Old 28th Jun 2024 at 1:33 PM Last edited by aelflaed : 5th Jul 2024 at 1:15 PM. Reason: solved, I think!
Default Lightning and custom trees
How does one disable lightning strikes on an object?

I have several custom trees that seem to be half-enabled, so that they throw an error when lightning tries to strike them.
Here's a snip from the error:

Object id: 418
name: Controller - Climate
Stack size: 4
Error: Slot number out of range.
Iterations: 694
Frame 3:
Stack Object id: 620
Stack Object name: WfS2 Palm Tree
Node: 4
Tree: id 8193 name 'CT - Do Lightning Strike' version -32754
from TreeGlobals
Prim state: 0
Params: 30 Locals: 0 0
Frame 2:
Stack Object id: 620
Stack Object name: WfS2 Palm Tree
Node: 10
Tree: id 4116 name 'Lightning - Localized' version -32747
from Controller_Climate
Prim state: 1
Params: Locals: 0 0 2 0 1 5

My new downloads are on my Pillowfort
Advertisement
Scholar
#2 Old 28th Jun 2024 at 10:51 PM
Try to clear the flag "lightning strikeable" in function init after anything else that may set it.

My object data 8 clear flag #16
Alchemist
Original Poster
#3 Old 29th Jun 2024 at 2:35 AM
Quote: Originally posted by jonasn
Try to clear the flag "lightning strikeable" in function init after anything else that may set it.

My object data 8 clear flag #16



Well, I'm not certain I've matched what you said...I found this though...is it any good?

[prim 0x0002] Expression (My 0x0008 (flags) Clear Flag flag# Literal 0x0010 (Lightning Strikeable)

I've inserted it as a new line at the end of Function-Init. Will see whether that works.
Screenshots

My new downloads are on my Pillowfort
Scholar
#4 Old 29th Jun 2024 at 12:19 PM
It might not get stricken now. To verify that the flag is clear, you can look with COE. Perhaps the tree has other slots that could be used. Then you could clone the whole CT into the tree's private group with the lightning bolt effect targeting another slot. I don't know how to add slots: it has to be done in the 3D, which is very complicated.
Alchemist
Original Poster
#5 Old 3rd Jul 2024 at 10:41 PM
That seems to have worked. There's a freeze happening now and then during stormy weather, but I'm not sure that is related to the tree/lightning problem. Certainly I haven't had that error again.

My new downloads are on my Pillowfort
Back to top