Concerning setting state in ACS I could code this:
Code: Select all
str stat = StrParam(s:"Cyclus", d:phase); // phase has a value of 0-27
SetActorState(moonTID, stat);
In ZScript in the code of the actor I have to use this ugly switch for 28 different states:
Code: Select all
switch (phase)
{
case 0: SetStateLabel("Cyclus0"); break;
case 1: SetStateLabel("Cyclus1"); break;
case 2: SetStateLabel("Cyclus2"); break;
case 3: SetStateLabel("Cyclus3"); break;
etc. (you get the idea :))
instead of just coding this:
Code: Select all
string stat = string.format("%s%d", "Cyclus", phase);
SetStateLabel(stat);
which is not allowed ('cannot convert string to statelabel').
So, it would be nice to allow setting statelabel with a formatted string like in the example (for at least actors with no monster-AI like the ACS function).