I want my spawner to start spawning when a global PlayMaker event happens. How could I do that? Right now, I'm using Syncro spawner. When the global PlayMaker event hasn't happen, the spawner is deactivated. When the global PlayMaker event happens, I activate the spawner. However, when I activate the spawner, nothing is spawned.
I created an empty object and attached the "Trigger Spawner" script to it. I selected "Code-Triggered 1". How can I hook up the global PlayMaker event so that when the event happens, the triggered spawner starts spawning?
I use "Repeat Wave" in "Code-Triggered 1". Using PlayMaker, how can I detect the event that each repeated wave ends and perform an action? I want to display an on-screen message after each repeated wave ends.
Use the built in Playmaker method "call method" and call the method in TriggeredSpawner called ActivateCodeTriggeredEvent1. It doesn't need any parameters passed.
For wave repeat, use the TriggeredSpawnerListener and subclass it, then override the method WaveRepeat. Check the Event Type using the first parameter to make sure it's the code triggered event if you have more than one event.
"For wave repeat, use the TriggeredSpawnerListener and subclass it, then override the method WaveRepeat. Check the Event Type using the first parameter to make sure it's the code triggered event if you have more than one event." What do you mean by "subclass it, then override the method WaveRepeat." I use PlayMaker to write my whole game and don't know how to code in Unity.
You said when you enter Play mode nothing is spawned. Your image shows an FSM on the triggered spawner itself. And there is only one state in your FSM, so it would trigger the code-triggered event 1 instantly.
If you wanted to trigger it instantly on Scene start like that is set up to do, you wouldn't need an FSM to trigger it. You could just use the "Start" event of the Triggered Spawner. Go ahead and try that and make sure it works. Now if you want to trigger the code-triggered event 1 at a certain different time, you would have an FSM on a different game object probably, that after a certain event, triggers the code-triggered event.
If you don't write any code, use the provided Triggered Spawner Playmaker Listener instead of what I said about subclassing. That lets you select the FSM and event to run when the repeat wave happens.
I trigger the code-triggered event instantly to see whether triggered spawner works. Once my "Call Method" PlayMaker action works in this case, I'll put it in another FSM. I have tried putting the "Call Method" PlayMaker action in another FSM and call "Call Method" when a global event happens. Nothing is spawned in Play mode. I try the "Enabled Event" trigger in the following picture (https://drive.google.com/file/d/0B88PdDsyVgCqZGstclFmbzFxZGc/edit?usp=sharing). I leave the "TriggerSpawner" game object active when I enter Play mode. Nothing is spawned in Play mode.