Hi everyone, I'm a bit of a loss with this problem and am hoping someone can offer a solution.

Consider this:

I have a button that needs to be used (via player click) very frequently. It has simple scripting that sends an item event to Osiris. Osiris catches the event and plays an effect on the button. That's it.

The problem is that the button throws its event after a delay of anywhere from zero to ~1.5 seconds when it isn't placed within the center of the most populated area of the map. Clearly this is strange, as one would assume that a very remote area would offer the best performance--since almost all objects are culled.

Now, even in this special spot, the button is still delayed if I have my camera angled such that many objects/light probes are visible, but I can understand this. What I cannot understand is why the button is so severely delayed when placed in a very remote location with nearly no objects or light probes.


Here's the itemScript:
Code
INIT
ITEM:__Me
EXTERN STRING:%AMER_Button_Event = null  //This is defined as "TESTTEST"

EVENTS

EVENT Button_Use
VARS
CHARACTER:_Char
ON
	OnUseItem(_Char,__Me)
ACTIONS
	CharacterItemEvent(_Char, __Me, %AMER_Button_Event)


...And the Osiris catch:
Code
IF
CharacterItemEvent(_Char, _Item, "TESTTEST")
THEN
PlayEffect(_Item, "AMER_RS3_FX_ButtonPress");

Super simple.


I can't leave the button in the center of my map, so I've tried everything I can think of to have it perform, as well as it does there, at another point in the map--Region triggers, Cull triggers, low-impact atmospheres, surrounding the button with terrain cliffs and random doodads--to no avail.

Any suggestions would be greatly appreciated.


Edit: I should note that there is no such lag in-editor. Only in-game.

Last edited by Ameranth; 02/05/18 04:45 AM.