Hi TESA!
I'm currently experiencing a bug with my mod that I can't figure out what is causing it.
I have a test room where I create my scripts and trigger areas first, before I move on to implementing it on the game world. In that area, the trigger boxes work perfectly. When I make a trigger box outside that environment, in the open game world, the trigger box no longer works properly, even if I copy one from my test area.
What happens is this:
In the test zone, when I enter this trigger area, it uses this line:
Debug.notification("Current Area is " + aBleakShelterAreaNumber.GetValue())
And it returns the appropriate value which is defined like this:
Function UpdateAreaNumber()
if (IsInsideArea.GetValue() == 1)
aBleakShelterAreaNumber.SetValue(ThisAreaNumber)
Else
aBleakShelterAreaNumber.SetValue(0)
EndIf
EndFunction
(That function is called on enter and leave, where IsInsideArea gets set to 1 or 0, respectively)
aBleakShelterAreaNumber is a globalVar so I can use it in another script. ThisAreaNumber is an int property defined in the trigger area's properties.
And the message properly shows "Current Area is 2.0000" because the area I entered was ThisAreaNumber = 2.
However, when I test outside my testzone, in the open world, I get:
"Current Area is 0.0000"
No matter what Int I define the area to be, no matter the rotation angle, no matter if I copy-paste the area from my test zone or make a new one. Can anyone help me fix this please?
Thanks in advance,
Bleaky