Procedual floor/Spawner not calling (Dispatcher issue)

Hey there.

I’m making a side scroller with a procedural floor.

The floor is made through a spawner with a hit box at the end and when the hit box is passed the spawner creates another section of floor.

My thoughts are I can destroy the section afterwards, saving on having too many things loaded in the world.

I can just create and destroy the world around the player as they travel to the right.

The problem is my spawner creates the first section, the hit box gets hit, But reads none while accessing the call to the dispatch in the spawner.

  1. Call doesn’t work. I initially pulled the reference from the variable list, but it never fires.
    It’s accessing none, which assumable means my reference is empty in the variable list.

  2. So maybe I cast? But casting for every object section of floor and everything else feels a lot.
    Surely this cant be the way. I don’t even know what Itd like as the wild card.

  3. This print never fires due to the issues prior assumable.

Im a bit stuck with it. Itd like to learn how spawners work and have a basic game based around them.

Thanks for reading

This does nothing:

image

Where is the object?


  • lets say this is the platform:

  • and this is the spawner dropped in the level:

Something like this? This can be simplified further, or made more convoluted. Technically, you do not need an extra dispatcher. You can bind directly to the existing one the collision volume has.


@ClockworkOcean didn’t you recently post a system that takes all directions into account?

1 Like

Yeah, OK this is super interesting.

So dispatcher actually worked backwards for this situation to what I thought.

The dispatcher is actually in the object itself, which allows the call to be self.
The reference for the bind to work is in spawner when it’s created, allowing the bind to happen.

That’s pretty sick.

I’m trying to translate it through to my application. My character doesn’t actually move. The world moves around them.

So I’ve got my floor with interp to movement component sliding the floor past the character while they are constraint on an axis.

Which leaves me with either an Infinite loop error or it glitches out creating 8 boxes before crashing after accessing none.

OK ignore this.

I’m not sure what I changed. But the loop is gone, and multiple boxes are gone. It now works flawlessly.

Thanks for taking the time to explain it. The reverse dispatch is a crazy new tool!

1 Like

Hey again sorry to necro,

I have another question about dispatching.

How would you go around random flooring?

I guess this doesn’t work any more as its no longer got a hard reference,

The reference is dynamic, So the dispatch would have to be dynamic too?

Thanks for reading.

Edit: I could for example use a Do once MultiInput node and have loads of the same nodes to keep the references hard.

But it seems super overkill.

Floor classes should inherit from the same parent class that has the dispatcher. That’s providing each floor has actual unique functionality rather than just a different mesh / transform.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.