Sign In Register

How can we help you today?

Start a new topic
Answered

Order of scripts?

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

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

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 ? 


Regards,

Liam

Login to post a comment