[Bug] Re-Enabling inspector record not updating values correctly

I created an script to enable/disable inspector in certain times, i created an global variable named “Paths” then i fill with lot of values when game starts, when i call “Disable inspector recording” and in some time i call “Enable inspector recording” the “Paths” variable appear empty array in inspector, if i modify this variable, still an array empty values and Count Of(Paths) returns 0, but i known that this variable is filled with values because my dummy bots still moving using these positions in Paths variable.

Code that i’ve used:

variables
{
	global:
		0: Paths
		1: EnableWorkshopInspector

	player:
		0: CurrentPathTarget
		1: CurrentEntityTarget
}

rule("CGameMode::Editor::AddPathNode")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Event Player == Host Player;
		Is Button Held(Event Player, Interact) == True;
	}

	actions
	{
		If(Not(Is Button Held(Event Player, Crouch)));
			Modify Global Variable(Paths, Append To Array, Position Of(Event Player));
			Wait(0.250, Ignore Condition);
			Small Message(Event Player, Custom String("{0} Added Position: {1}", Icon String(Checkmark), Position Of(Event Player), Null));
		Else;
			Small Message(Event Player, Custom String("{0} Removed {1} node(s).", Icon String(Warning), Count Of(Global Variable(Paths)),
				Null));
			Set Global Variable(Paths, Empty Array);
		End;
		Wait(0.250, Ignore Condition);
	}
}

rule("CGameMode::Editor::InitializePaths (Map: Workshop Chamber)")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Current Map == Map(Workshop Chamber);
	}

	actions
	{
		Set Global Variable(Paths, Empty Array);
		Modify Global Variable(Paths, Append To Array, Vector(16.112, 0.002, -0.012));
		Modify Global Variable(Paths, Append To Array, Vector(16.136, 0, -15.227));
		Modify Global Variable(Paths, Append To Array, Vector(4.695, 0.002, -15.686));
		Modify Global Variable(Paths, Append To Array, Vector(-15.535, -0.002, -15.867));
		Modify Global Variable(Paths, Append To Array, Vector(-15.864, -0.002, -8.004));
		Modify Global Variable(Paths, Append To Array, Vector(-15.876, -0.002, 4.213));
		Modify Global Variable(Paths, Append To Array, Vector(-15.835, -0.002, 13.881));
		Modify Global Variable(Paths, Append To Array, Vector(-4.290, -0.002, 15.851));
		Modify Global Variable(Paths, Append To Array, Vector(14.006, -0.001, 15.910));
		Modify Global Variable(Paths, Append To Array, Vector(10.725, -0.001, 11.580));
		Modify Global Variable(Paths, Append To Array, Vector(5.989, -0.001, 6.012));
    }
}

The inspector is currently not displaying arrays correctly on PTR. Could that be the issue?

2 Likes

Thanks for the report! As mentioned in another comment, there were a couple of issues with some Actions and Inspector recording. We’ve been looking at fixes for those which should help your issues here. So keep an eye out for any updates!

2 Likes

Any ETA when the update comes out?

1 Like