Download

problem with random actor from array

Hi,
i have setup where AI character can choose from several ‘Points of interest’ within specified range and move there. These POIs are just empty actors placed in level.
Previously, I made similar setup where AI would choose point farthest from its location, spawned particle there for debugging purposes and moved there.
Current setup with random selection gives me strange errror. Debugging particle spawns at different POI than AI would go to. Could anyone help me and tell me what I’m doing wrong?
Thanks, H.

POI points in screenshot below are called ‘CoverPoint’
http://s30.postimg.org/ses420bgh/Random_Point.jpg

Your sphere radius is set to 0, so there will be no points of interest.

hey, thanks for looking at my problem. but that’s not it. As i was taking screenshot i accidentaly removed variable linked to that node. It is usally around 2000.
I was trying some other tricks i could think of and found that if i create temp variable and set result to that variable and then link ‘Get’ of that temp variable to emiter and ai move to, it works. Still do not understand why.

What exactly does the AI do with your current setup? I haven’t used that type of overlap check before, but I suggest you try changing the Actor Class Filter to be your POI class, and remove the object types array.

AI seeks actors of ‘CoverPoint’ class within specified range from spawn point and goes there, waits few secs and move to another one. Sphere is there to search for said actors. It is quite simple and effective setup without need of behavioural trees and what not. I kinda made it work, but i have no idea why it works with new arrangment.

EDIT: in my testing, i added 2 print string nodes, each displaying coordinates for emmiter and selected CoverPoint. Despite the fact both nodes were linked to same node, they had different coordinates, so i unliked them and added intermediary temp variable. for some reasons, this stupid trick works.

this works as intended
http://s1.postimg.org/4345c8u4f/2015_07_22_21_09_21_Greenshot.jpg