Path Finding ... don't get lost

Ah, yep, that’s what I was missing. Of course if they have the same value they’d be an equally good choice . . . I guess this just makes me thankful there are people who think more logically; I miss things like that all the time.
I’m glad you’re tolerant of Python, since I’ve been told it’s looked down on for some reason, possibly being considered ‘amateur’. But yeah, it’s been very intuitive so far (except for numbering starting at zero. That always gets me.)
Anyway, what do you think the next step in this whole process is? What can I do to help further it?

Next task is to figure out the best way of having them ‘look around’. Combo of raycast, message last contacted object etc. i imagine. Any good ideas welcome, I have to dig through my test projects to see what works best.

And don’t feel bad about Python, I don’t know who looks down to it, but it is establishing itself very well in the development world.
For sure you always have the unflexible old grumps that witch hunt everything not in their books.
I love it

@TinkerSmith have them all try to point first, then have a boolean value for each set wether or not it sees the player. Then, it goes from top left to bottom right for each false one, testing for a true one and pointing at it. It repeats this several times to finish for all of them

Yeah @meburningslime , not exactly what I wanted but it will do the job.
*CENSORED* the cell value, LOL, as long as they build a chain that points to the player.
Otherwise I would have to track each single one by its own ID and that gets nasty.

But wait, what is the best way to test for a true one?

@TinkerSmith I would have true ones spawn another invisible block on top that is tested for.

I was afraid you would say that, LOL

:confused:

Actually, I hear you @meburningslime with the invisble block, that’s sort of what I did with the scanner block in the map generator.
I also hear you @thebrickccentric with the pointers.
But I think I have another go at trying to get my map cells smart. I did that rudimentary in some other examples, but I think smart cells can be useful on many other occasions.
Feel free to follow the pointer path while I do this. If it’s @#$% I come back to it, LOL.

The idea is, I address every cell by its grid position, so that I can send commands to specific cells. As in ‘set value’, ‘read value’, along those lines. Basically, instead of faking a list or an array with a bundle I use the cells themselves as an array …
That way it is also easier later on to ask specific ones to do whatever one wants. Useful for path finding, map generators, etc.

Got the basic sorted, the initial ‘HEY YOU, I AM TALKING TO YOU’ is working. Now I ‘just’ (always easy said) have to do the ‘scan’ routine.
Not sure if let the controller drive it, I know that will work for sure, or if I send a command to the cells to scan their neighbors.

We will see :slight_smile:

P.S. the initial setup is here in case you have improvement suggestions.
Here we go again
I know things could be more streamlined, but I try to create a modular system with bundles I can use for other purposes.