Hello guys, I am creating a multiplayer game.
Already completed login system and character creation/selection, and moved to the lobby where I will show online users. I used va-rest plugin combined with the Apply url node to get the php response at my apache server.
I had no problems so far getting info of 1 user or 1 character with this structure:
For testing purposes, va-rest apply url sends this:
http://localhost/gameinfo.php?user=1&password=1&email=1&stuff=register
And gets this result:
{“result”: “success”}
Blueprint example:
But now I am trying to get a more complex response, in this case I need a list of online users:
Apply url with this format:
http://localhost/getcharacters.php?stuff=OnlineUsers
Response obtained:
{“result”:“success”,“characters”:[{“name”:“11”,“class”:1,“level”:1},{“name”:“t3t”,“class”:2,“level”:1},{“name”:“321”,“class”:2,“level”:1},{“name”:“1111”,“class”:1,“level”:1}]}
To store the information of characters names, class and levels I pretend to save them at a blueprint structure called UserInformation, I created a variable in the other blueprint called OnlineUsersList and selected variable type UserInformation as array
I created a variable in the other blueprint and selected variable type UserInformation (the structure shown before)
Does anyone know how do I store the json response from url and save it in this array?
I am very new in programming and I have been stuck here for a few days now…
I need to save json information inside the blueprint structure please, can anyone help me