game-maker-studio-2game-maker-language

(GMS2) Spawner object doesn't spawn items


In GMS2 I have a spawner item with the following code:

This works perfectly fine, coffee beans are spawned when it doesn't detect any coffee bean nearby.

The problem is that the same code doesn't work when I duplicate this object and create a spawner for another item.


Solution

  • Ok, I needed to use instance_create_depth instead of instance_create_layer.