What is the order and trigger for certain scripts? Specifically GS_PLAYER_CONNECT, I put a test .setScriptData() in there just to see if it gets called when I authenticate, but it isn't always called? I've logged out, disconnected in the test harness etc. I'm trying to find the best time in the authentication/connection sequence to process some player data, specifically the time elapsed since the last login for periodic rewards and track when they "come online" using a runtimeCollection.
I tried putting this code in a module that is required() by my DeviceAuth and Auth requests, and would eventually go into my Social auth scripts, but for some reason, the player isn't actually authenticated before my module script is run, which means that I'm not able to return a value for .getPlayer().getPlayerID().
I toyed with putting my module requirement in the AuthResponse script, but I'm just not sure where the best spot for it should be, especially since I want grant the rewards to the player then return the new values via scriptData in the AuthResponse after all said and done.
Best Answer
C
Customer Support
said
over 5 years ago
Hi Karl,
The AuthenticationResponse script will run before the GS_PLAYER_CONNECT one does. How are you disconnecting from the test harness for the currently logged in user ?
Regards,
Liam
1 Comment
Customer Support
said
over 5 years ago
Answer
Hi Karl,
The AuthenticationResponse script will run before the GS_PLAYER_CONNECT one does. How are you disconnecting from the test harness for the currently logged in user ?
Karl Halterman
What is the order and trigger for certain scripts? Specifically GS_PLAYER_CONNECT, I put a test .setScriptData() in there just to see if it gets called when I authenticate, but it isn't always called? I've logged out, disconnected in the test harness etc. I'm trying to find the best time in the authentication/connection sequence to process some player data, specifically the time elapsed since the last login for periodic rewards and track when they "come online" using a runtimeCollection.
I tried putting this code in a module that is required() by my DeviceAuth and Auth requests, and would eventually go into my Social auth scripts, but for some reason, the player isn't actually authenticated before my module script is run, which means that I'm not able to return a value for .getPlayer().getPlayerID().
I toyed with putting my module requirement in the AuthResponse script, but I'm just not sure where the best spot for it should be, especially since I want grant the rewards to the player then return the new values via scriptData in the AuthResponse after all said and done.
Hi Karl,
The AuthenticationResponse script will run before the GS_PLAYER_CONNECT one does. How are you disconnecting from the test harness for the currently logged in user ?
Regards,
Liam
Customer Support
Hi Karl,
The AuthenticationResponse script will run before the GS_PLAYER_CONNECT one does. How are you disconnecting from the test harness for the currently logged in user ?
Regards,
Liam
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics