There are two ways:
- if you use GS1-style (if (playerenters)...) then you can access the parameters at any time by params[]
- if you use GS2 then you get the parameters on the first call to onPlayerEnters(), but you need to check if the parameters actually exist because onPlayerEnters() is also called when you enter other levels:
PHP Code:
function onPlayerEnters() {
if (params.size()>0)
echo("first parameter: " @ params[0]);
}