Alternative solution ... took a while but was a good learner

I made a very large box collision and couldn’t fire at all, and enemies effectively committed suicide. So I did this:

  1. Made just a collision box on the barrier itself.
  2. Added members to the tile so that it references the next tile (and the previous which wasn’t needed), Quite fun turning them into a linked list.
  3. Parameterized the Spawn Tile method so you can decide whether to lock or not. At initialization the first barrier is unlocked, the rest are locked
  4. When moving through a barrier, when leaving I test if you are still in the current tile or next tile, only locking if you entered the next.
  5. When entering the next tile, I unlock it’s barrier, then spawn a new tile, linking it to the list
  6. Maybe unnecessary but made a method that not only deletes the tile, but unlinks it from the list.

Was a good learner.

Some screenshots:

Infinite Terrain Game Mode - Event Graph

Spawn Tile

If Progressed Execute

Next Minus Previous

Tile Eventgraph

Tile Viewport

Privacy & Terms