What the title says.
I'm attempting to check via ACS's ScriptCall function, which calls InStateSequence, to check if an actor is in a state sequence (such as 'Missile') in order to trigger certain events (like floors lowering/raising etc).
After an actor is found via ActorIterator I call (roughly)
Code: Select all
mo.InStateSequence(mo.curState, mo.FindState(x))
With 'mo' being the first thing ActorIterator finds and 'x' being the statelabel to find. I know ScriptCall doesn't accept statelabel as a variable type so I figured I'd pass a string instead. Unfortunately, I discovered it's impossible to convert a string into a statelabel. Even casting doesn't seem to work. I even tried to convert a name to statelabel but that doesn't work either.
Test example I tried with GZDoom 3.0.1 and GZDoom g3.0pre-225-gd633e8a
Code: Select all
version "2.5"
Class T : Actor
{
void bleh()
{
string st = "konac";
statelabel statlab = statelabel(st); //I get "Call to unknown function 'StateLabel'"
}
}
And without casting I get "Cannot convert String to StateLabel"
What the title says.
I'm attempting to check via ACS's ScriptCall function, which calls InStateSequence, to check if an actor is in a state sequence (such as 'Missile') in order to trigger certain events (like floors lowering/raising etc).
After an actor is found via ActorIterator I call (roughly) [code]mo.InStateSequence(mo.curState, mo.FindState(x))[/code]
With 'mo' being the first thing ActorIterator finds and 'x' being the statelabel to find. I know ScriptCall doesn't accept statelabel as a variable type so I figured I'd pass a string instead. Unfortunately, I discovered it's impossible to convert a string into a statelabel. Even casting doesn't seem to work. I even tried to convert a name to statelabel but that doesn't work either.
Test example I tried with GZDoom 3.0.1 and GZDoom g3.0pre-225-gd633e8a
[code]version "2.5"
Class T : Actor
{
void bleh()
{
string st = "konac";
statelabel statlab = statelabel(st); //I get "Call to unknown function 'StateLabel'"
}
}[/code]
And without casting I get "Cannot convert String to StateLabel"