Checking for Int never returns true
So, i am trying to setup a patroling enemy with blueprints, which stops at the last targetpoint. I already got patroling enemys which work just perfect. The function is almost the same as the permanent patrol. The difference ist the part after checking if patrolindex <= the Array lenght of the patrolpoints. If the last point isn't reached the index gets increased by 1 and the function gets called again. If its the same or greater than the Array lenght i want to set the bool Quest Complete to true, so the function stops looping and sets the bool Oger Quest Check Dist to true. I really dont understand why the check of Patrol Point Index never returns true. Hopefully you can help my. Thanks Marogaz
asked Jul 05 '18 at 07:20 PM in Blueprint Scripting
It is because your branch checks for pess than or equal to the last index (length - 1) of the patrol points. that means the False branch only happens when the index is MORE than the last index of the patrol points, which cannot happen unpess you increased it to be out of range which would cause errors on your Get node on the left side. try changing it to a < (less than) instead of a
remember an array of size 3 will have indexes 0, 1, and 2. So length - 1 equals 2.
answered Jul 05 '18 at 08:14 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here