playMaker

Author Topic: Game over transition.  (Read 5755 times)

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Game over transition.
« on: March 28, 2014, 04:25:19 PM »
I recently I put together a small prototype with a simple health system how do I make it end within the same level? Because When I have a player take damage, the game doesn't stop and it doesn't transition to a locked gameover event.

Thanks.
« Last Edit: March 28, 2014, 04:33:56 PM by coffeeANDsoda »

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Game over transition.
« Reply #1 on: March 29, 2014, 12:20:22 PM »
You can set up a global transition that ends the game and when the player dies you send global broadcast to everything in the game to go to that event.

So basically in every FSM you will have a death state with a global transition attached to it that will be activated when the player dies by sending that broadcast event.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Game over transition.
« Reply #2 on: March 31, 2014, 01:57:16 AM »
You can set up a global transition that ends the game and when the player dies you send global broadcast to everything in the game to go to that event.

So basically in every FSM you will have a death state with a global transition attached to it that will be activated when the player dies by sending that broadcast event.

How would that work with actions though?

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Game over transition.
« Reply #3 on: March 31, 2014, 02:21:58 AM »
The send event action has an option to broadcast. The rest would be through states and global events.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Game over transition.
« Reply #4 on: March 31, 2014, 11:32:14 PM »
The send event action has an option to broadcast. The rest would be through states and global events.

So if I enable kill_player event it should work when I broadcast send event?

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Game over transition.
« Reply #5 on: April 01, 2014, 01:13:28 AM »
yes, but it has to be set as a global transition.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Game over transition.
« Reply #6 on: April 01, 2014, 01:27:42 AM »
On the gameover state? Or the setup state?

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Game over transition.
« Reply #7 on: April 01, 2014, 02:14:46 AM »
on the set up state.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Game over transition.
« Reply #8 on: April 01, 2014, 02:20:53 AM »
on the set up state.

Whether it's self, or broadcast all, it doesn't work.

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Game over transition.
« Reply #9 on: April 01, 2014, 12:02:59 PM »
Did you right click on the state and set up the transition as a global transition? So the transition will be set on top of the state instead of the bottom. Try that if you haven't with the broadcast.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Game over transition.
« Reply #10 on: April 01, 2014, 05:16:40 PM »
Did you right click on the state and set up the transition as a global transition? So the transition will be set on top of the state instead of the bottom. Try that if you haven't with the broadcast.

When I did that for the bottom state End game, the global transition line/arrow thing connect to it turned yellow and got a error and paused. But when I did the same thing and put the transition on the Setup state, the health bar went back to the amount that I started with.

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Game over transition.
« Reply #11 on: April 01, 2014, 05:52:23 PM »
Can you post a picture of your set up?
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Game over transition.
« Reply #12 on: April 01, 2014, 10:18:15 PM »

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Game over transition.
« Reply #13 on: April 01, 2014, 10:50:19 PM »
Check out this tutorial which can better explain events being sent to other objects with the broadcast.


So that each gameObject has the transition kill_player that stops movement, health, etc.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Game over transition.
« Reply #14 on: April 01, 2014, 11:28:08 PM »
Check out this tutorial which can better explain events being sent to other objects with the broadcast.


So that each gameObject has the transition kill_player that stops movement, health, etc.

How does it work without Send Event to FSM? Since I'm using a more recent version of playmaker.