Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: heavygunner on November 17, 2018, 11:04:29 AM

Title: [SOLVED] Spawning objects on certain spawn points
Post by: heavygunner on November 17, 2018, 11:04:29 AM
Hi !

I have 7 spawn points on my scenes. Player spawn point, Cube point 1, cube point 2 , cube point 3 , checkpoint point 1 , checkpoint point 2 , checkpoint point 3.

(https://i.imgur.com/qXlTHMU.png)

Once player is spawned, a cube should be spawn on one of cube spawn points. Once Player collided with cube, another checkpoint should spawn on checkpoint spawn point.

for example : if cube spawned on cube spawn point #2, checkpoint should spawn on checkpoint spawn #2, not on #1 or #3.

Then, once player, triggered checkpoint, another cube should be spawn on another cube spawn point. this will repeat.

I couldn't figure out the logic.

Help me  :-[
Title: Re: Spawning objects on certain spawn points
Post by: heavygunner on November 17, 2018, 11:56:26 AM
This is what i tried so far.
Get random Int between 1 & 3. and assign spawn location and save em as Current Spawn. This is worked. Problem is , Sometimes It keep selecting same number continuously.

Title: Re: [😭] Spawning objects on certain spawn points
Post by: djaydino on November 18, 2018, 08:00:52 AM
Hi,
I did some testing but it seems to be random on my end.

But you might want to use 'Random Event' or 'Send Random Event' instead, as you would only need 1 action.

or use an int switch instead of the int compares :)