Unhook the RequestCompleteCopy (red line) and see how it’s run. It’s just a “custom event” but by default it’s set not to replicate. For online use it should replicate and be run from/by the server not the user.
EDIT:
Does it work with 4.7.3? And do I still need to start a code template or does it work with Blueprint only projects as well?
Hello, I would first like to thank you for making this plugin. It works great! My only concern is I am trying to connect my game launcher to the same php script I am using to get the login info. Does the json look something like this?
{
“password”: “www”,
“username”: “qqq”
}
Record stored in CouchDB’s database. This is where the _id and _rev come from.
{
“_id”: “69b3d20dc682993f4ba9f349bb001582”,
“_rev”: “1-e33cc1b08ab503c6200abea3ae49c7d3”,
“array”:
{
“object0”: “value1”
},
{
“object1”: “value2”
},
{
“object2”: “value3”
},
{
“object3”: “value4”
}
]
}
I really appreciate your plugin. My small contribution is an example of how to do this with arrays. I saw a couple people asked. I tried a few different methods which didn’t work. Cheers! (Integrated with CouchDB)
There were a few moments where I had to mess with the nodes for a while to figure out how the plugin works. You should be able to answer most questions by messing with the plugin for a few hours.
Sorry to bother you ufna. Thanks for the awesome plugin!
I’m making multiple requests in succession. It seems like the requests need to be spaced 1 seconds apart for them to work. (Trying even .5 seconds fails)
I tired putting the variables into an array like pictured below.
Also, I made sure it wasn’t a problem with my server (Using CouchDB) by writing a quick script to make 10 requests instantly. The server responded to all of the requests.
Any ideas? I’m not able to put custom events for onrequestcomplete / fail inside a function. I have a feeling it would work that way. Anyone have ideas on a solution for this? I’ve tried a lot of different things for around 6 hrs.
Got any ideas on a method without having to space the requests or a BP method of handing off requests to separate request branches if they appear in quick succession? That’s the solution I might end up using.
I don’t know if what I said made my sense. My apologies.
I ended up using a method like this…
Created a struct to hold all the JSON info. Made an event which saves each request as a struct in an array.
Then I have a delayed “for each” in array (manually, not the utility node) which fires the json plugin stuff. At the end, before Bind Event to OnGetResults the Struct entry is removed.
This keeps multiple requests “spaced” with a time delay. Sometimes it still fails to send the data. I’m going to have to use other methods for error correction.
Data -> To Struct -> Struct to Array -> Custom Delayed For Each Loop on Event BeginPlay -> JSON Request Using Struct Data -> Removes Struct From Array -> On For Each Completed Restart Loop
This creates basically throttles the plugin to 1 JSON request per second which usually returns data as it should.
I wonder why the plugin returns nothing on requests in quick succession? Both VaRest and JSONQuerry do this. I used a script to make sure it wasn’t a problem with my server. I’m posting this as food for thought. Thanks for the awesome plugin!
What I did for multiple calls was have all the requests bind to the same OnComplete OnFail binds. I use an enum to tell which call was just made. I then Switch on the enum and send the handlers to a different class. Here are my BPs.
Here is an example call. I edited the Plugin a little to work with Play Fab. All my obect creation is behind the scenes to make blueprints readable. It is still the same process though. This is a request.
The next image is on the event graph of the same object. I use an enum to decide where the response should be sent.
I am actually in the progress of adding the entire PlayFab API into a modified VaRest plugin. It simplifies the process alot.
I can’t seem to get this plugin working. Whenever I drop the plugin into my plugins directory and then enable the plugin, UE4 tells me I need to recompile when I open the project. When the recompile fails, UE4 says I need to rebuild it manually. How do I do that?
Did you grab the release or the master version. I believe one has binaries that you add to your unreal install directory the other you build from source. Are you using a source built game or one that is just using blueprints?
If your using blueprints only grab the release version of the plugin and follow the instructions on the wiki page for his plugin. If you are building from source then once you drop the plugin in the plugins folder right click on your uproject file and regenerate visual studio files. Open up the visual studio solution and rebuild your game and the plugin will be rebuilt also.
Thanks for the idea Lyons! I will try that. My solution seems a bit complicated. Also, xulture, thanks for those changes!
Also, I had to switch to the current development branch for the plugin to work with UE 4.8 in case anyone else is wondering. It would crash otherwise when running more than one player instance within the editor.
I tried to follow the Parse Login tutorial, but there is no url to parse to? I dont get it Anyone who can help? I think I have got the plugin working. When trying to do a get request it prints the content of the file on the server in the log but returns no response string to the game.
im trying to do a simple login screen.
Here’s how you can use a “where query” for Parse for those of you wondering, because I certainly was.
If you look at Parse documentation for this everything seems to work as explained there.
This method works for me and I haven’t found any issues yet.
Set up a Parse Request Object with the “GET” verb and X Www Form Urlencoded" like you would normally.
“Parse Class” is whichever class you want to submit a query for. You can use the “Construct where query” method if you want, but I find this quicker.
NOTE: I had to use the PercentEncode function in order for this to work my iOS device.