PHP Code:
setstring this.levels, level1.nw, level2.nw;
setstring this.level_level1.nw, 0, 0, 0, 1;
setstring this.level_level2.nw, 0, 0, 1, 1;
setstring this.start, overworld, cavegmap, elitehouse;
setstring this.start_overworld, 0, 0, 0, 1;
setstring this.start_cavegmap, 0, .5, .5, 1;
setstring this.start_elitehouse, 1, .5, 0, 1;
for ( a = 0; a < this.levels.size(); a++ ) // I don't know the GS1 size var for an array, sorry!
{
if ( strequals( #L, #s( this.levels[a] ) ) )
{
setstring this.temp, this.( @ "level_" @ #s( this.levels[a] ) ); // Really sorry, not sure if this is possible in GS1
seteffect this.temp[0], this.temp[1], this.temp[2], this.temp[3];
}
}
for ( a = 0; a < this.start.size(); a++ ) // I don't know the GS1 size var for an array, sorry!
{
if ( startswith( #s( this.start[a] ), #L ) )
{
setstring this.temp, this.( @ "start_" @ #s( this.start[a] ) ); // Really sorry, not sure if this is possible in GS1
seteffect this.temp[0], this.temp[1], this.temp[2], this.temp[3];
}
}
A few things might need tweaked but I think that will work ...