Hello I am using Avrest plugin , when I get a json object I split it and recover a numeric value 1 or 0 , the issue is that I want to spawn a character when the value is 1 and despawn when its 0 , but the blueprint I did is not working, can someone help me understand why and make it work ?
here it is
where I get the data from
Here the splitting and selection of the data value I want :
and here the final part where supposely it should spawn the character, there is a target with a tag inside the game, I tested with a button on click event and it works it spawns but doesn’t when I connect to the varest value … .can someone help me and explain me how to fix ?
Could it be that the number you are trying to compare is not “1,0” but “1” or " 1"? Can you try to get the string and drag off of the pin from the string and e.g. use a “Contains”? Or first let the number be printed on your screen?
To print the number:
Instead of using the branch use a PrintString node and connect your GetStringField output from “field3”.
To use “Contains” drag off of the output pin from “field3” and then type in “Contains”. This node can than be used with a branch instead of your “Equal” node.
Your CallURL doesn’t show the other settings which are not connected, is that intended, edited in the image, a bug or an addon? I mean the settings like URL, Verb, Content-Type…
I tried testing and
the prints work , after clicking it prints the location of spawn , and it prints after the spawn , but nothing spawns, there is no AI spawned in the outliner.
If I move in the position where should spawn obut put it above ground spawns, dunno where to find nocollisionfail?
Also the other issue is that now if I link to the VA rest blueprint block it works, it spawns the char but it keeps spawning one char every 2 secs more or less… I would like to spawn only one and only if the var is at “1” , what can I add to limit ? or check if there is already a spawned char?
NoCollisionFail is an input on the SpawnAI node. To limit the spawning you could use the DoOnce node or check if the spawned actor is valid and then spawn.