playMaker

Author Topic: Enemy Hit Counter for High Score[SOLVED]  (Read 3069 times)

Collider

  • Playmaker Newbie
  • *
  • Posts: 7
Enemy Hit Counter for High Score[SOLVED]
« on: January 17, 2014, 08:31:05 AM »
Hello :)

i’ve searched and read topics like http://hutonggames.com/playmakerforum/index.php?topic=1288.0
But it’s not so easy and i hope you can help me:

I spawn enemies from the back that are moving. If i hit one of these enemies with an object, e.g. a cube, i want count 1 point for this action.

So what did i need? Global variables, a GuiText… and…? Can someone help me… possibly with screenshots?

Thanks in advance  :)
« Last Edit: January 24, 2014, 06:36:52 AM by jeanfabre »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Enemy Hit Counter for High Score
« Reply #1 on: January 17, 2014, 09:12:29 AM »
 You probably want GUI Int Label and whenever an enemy it hit you send an event to increase the score int variable by 1. The GUI should be showing that iny and automatically update.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Collider

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Enemy Hit Counter for High Score
« Reply #2 on: January 18, 2014, 09:19:26 AM »
Perfect, it works! Thanks for your help :)

Is it possible to store the High-Score after quit the game? I’m working with level load for a start menu. So it would be great to have the high score in this menu, also after quit this game.


Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Enemy Hit Counter for High Score
« Reply #3 on: January 18, 2014, 09:30:03 AM »
You'll need a Save solution from the asset store (i think there are some free ones too) or an XML solution for that.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Collider

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Enemy Hit Counter for High Score
« Reply #4 on: January 21, 2014, 11:41:19 AM »
Thank you! One more question – how can i set the position of the score? It’s always upper left. And is it possible to change the font and height of the score?

The GUILayout Int Field have a Style-field… but i don’t know how to use it in playmaker…

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Enemy Hit Counter for High Score
« Reply #5 on: January 21, 2014, 11:50:49 AM »
You'll need to use GUILayoutStart and GUILayoutEnd with any actions you want inbetween those two. Set the position with GUILayoutStart, you can observe the changes in Game View.

For custom fonts and such you have to setup a GUI Style with what you want and tell the GUI to use it.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Collider

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Enemy Hit Counter for High Score
« Reply #6 on: January 23, 2014, 12:12:21 PM »
But how can i setup a custom GUI Style?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Collider

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Enemy Hit Counter for High Score[SOLVED]
« Reply #8 on: January 27, 2014, 04:17:27 AM »
Thank you so much :)