Left 4 Dead 2

Left 4 Dead 2

Ver estadísticas:
Jo 24 AGO 2023 a las 4:22 p. m.
Random Survivor
Does anyone know how to use the new script functions? im kinda lost here
local gamer = GetRandomSurvivor(); printl(gamer);
Publicado originalmente por output:
AN ERROR HAS OCCURED [the index 'GetRandomSurvivor' does not exist]
Publicado originalmente por Rayman1103:
The new script functions are part of the CDirector class. So to access them you'll do the following:

local randSurvivor = Director.GetRandomSurvivor(); printl(randSurvivor);
< >
Mostrando 1-3 de 3 comentarios
Evil 24 AGO 2023 a las 4:55 p. m. 
I've had zero time to look at what that does but I'd guess it would work more in this manner:

local player = GetPlayerFromUserID( params["player"] ); while ( player = Entities.FindByClassname( player, "player" ) { if( player.IsValid() ) { local randvalue = player.RandomSurvivor() if( player.SomethingHappened() = randvalue ) { player.GetRandomSurvivor(); } } }
Jo 24 AGO 2023 a las 6:05 p. m. 
Publicado originalmente por Evil:
I've had zero time to look at what that does but I'd guess it would work more in this manner:

local player = GetPlayerFromUserID( params["player"] ); while ( player = Entities.FindByClassname( player, "player" ) { if( player.IsValid() ) { local randvalue = player.RandomSurvivor() if( player.SomethingHappened() = randvalue ) { player.GetRandomSurvivor(); } } }

Publicado originalmente por out:
line = (8) column = (36) : error can't assign expression

?
El autor de este hilo ha indicado que esta publicación responde al tema original.
Rayman1103 24 AGO 2023 a las 6:15 p. m. 
The new script functions are part of the CDirector class. So to access them you'll do the following:

local randSurvivor = Director.GetRandomSurvivor(); printl(randSurvivor);
< >
Mostrando 1-3 de 3 comentarios
Por página: 1530 50

Publicado el: 24 AGO 2023 a las 4:22 p. m.
Mensajes: 3