Function parameters received

I have 9 spawn points designated by target points. I want to spawn 5 guns at any 5 of these 9 points, no overlaps. In my level blueprint, I have put the spawn points into an array. I am getting a random point and passing it into my Spawn One Pistol Function. I log the input values. In my spawning function, I log the received parameters, and they are different. Why?

^ My Level blueprint

^ My Spawn One Pistol function

^ Input targetPoint was 9 but received parameter targetPoint 1. The received parameter is random everytime, not an off-by-one issue.

^ When I hardcode a fixed targetpoint as input, the received parameter is correct.

^ Correct received parameter when hardcoded.

I am unable to attach any more images, but when I remove the input from Level Blueprint into the function, the received parameter is “Received None”. Something is clearly modifying the function parameter received by the Spawn Function, because hardcoding it works as intended and no input produces no results (which is correct). I haven’t been able to find anyone else with a similar problem.

Sorry mods, didn’t realize the title was cut off. Is anyone able to help me change the question title to “Function parameters received different from Input”?

Because it is getting a random integer each time you call the “Get” node. So first time it calls maybe chooses index 3 passes that to function. Then cruises along to your “print” node and the print node itself calls the “get” and maybe this time chooses index 2. If you want it to say the same thing, store the first output as a variable. See this video, I helped someone else with this very issue a while back. May clear things up :slight_smile:

I figured this out about 12 hours after posting my question, but it had not been approved at that point, but yes, it was indeed because the random number was being generated multiple times. Thank you for your response!