How In the World Does "Set Objective Description" Work?

I cannot figure out why the game sometimes resets the objective description back to “Skirmish”, and then for the rest of the game it locks in as “Skirmish” despite repeating “Set Objective Description” actions that are meant to change the description to what I actually need it to be.

I’ve tried running “Set Objective Description” under a Global Rule, I’ve tried running it from Each Player, I’ve tried doing it only once at the beginning of the game, and repeating it with each enemy wave. It kind of seems like players leaving the game is what’s causing it to reset and lock on “Skirmish”, I’m not sure though. Anyone know anything about this?

Hm, reverting to the Default Objec Desc is something I’ve only encountered when moving myself from Player Slot to Spectator.
Is your intention to simply have a different static text or is it to display something like the Players Hero / Variable ?

I’d assume what makes you the problems is the Reevaluation so I’m going to follow up with some when to Reevaluate what part.


rule("Rule 1")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Set Objective Description(All Players(All Teams), String("Hello"), Visible To and String);
	}
}

This would be a case where you need to Reevaluate Visible To and String because you want it visible to All Players @ any time, when somebody joins after the Action has been executed they won’t see the String;
The String needs to Reevaluate because it’s a preset String that changes based on your language, if you don’t reevaluate the String it should stay the Language of the Hosts client at the time of executing, regardless of whether or not your Client uses a different language.


rule("Rule 1")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	actions
	{
		Set Objective Description(Event Player, Custom String("Goodbye"), None);
	}
}

This one doesn't need either reevaluation reason being, the Player executing will always be the Event Player and the only Player who it is Visible to,
the String doesn’t need to Reevaluate because it isn’t based on your Client language & can’t change to a different String


rule("Rule 1")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Set Objective Description(Local Player, Local Player.A ? Custom String("Victory") : Custom String("Defeat"), Visible To and String);
	}
}

This one would require both as the Local Player Value is unique to every player, not reevaluating this one would cause it again to not be Visible to Players that Join after the execution of the Action & wouldn’t change to “Victory” if the Players Variable A becomes true.


In addition if you let the Event Player execute said action better make sure that the Visibility is either only the Event Player or doesn’t reevaluate as this could cause issues with multiple Desc’s trying to be Visible at the same time.

If you make it visible to all Players rather execute it at the Global level and reevaluate Visibility if you want Players that joined later be able to see the Desc.

Thank you for such an in depth response! Yeah, I did it with All Players, and reevaluating both Visible To and String. The text is static, it’s meant to be the same thing throughout the whole game, so that’s luckily not an issue. Maybe multiple objective descriptions are piling up somewhere and it’s messing it up, as you mentioned. Or as I mentioned before it might have something to do with players leaving, and some kind of ID with the objective description was linked to that player and gets deleted when they go.

I have not tried doing it from Each Player, which is only visible to the Event Player. I will try that, that sound promising.

1 Like