playMaker

Author Topic: [solved] Lives & Local Scoring?!??  (Read 1530 times)

Col. Phil Bilko

  • Playmaker Newbie
  • *
  • Posts: 45
    • View Profile
[solved] Lives & Local Scoring?!??
« on: April 09, 2011, 06:31:33 AM »
Hello;

Just for a second pretend I am a complete novice at coding in Unity.... Ok actually I do not know how to code at all haha :D But I have put together a somewhat fun game so far with Playmaker.

Question One: How can I have it where a game object has 3 lives and when it collides with a trigger loses a life before respawing to set location? Also displaying a counter on screen.

Question Two: Is it possible to have score boards or local scoring with playmaker? If so how do I do it? (Scoring is not really needed for this game but would be nice to have some form of visual reward for collecting items)

I have EzGUI and Sprite Manager if that makes a difference??

Thanks in advance to those if any help a novice such as myself.

Regards;

Bilko
« Last Edit: April 15, 2011, 01:18:13 PM by alexchouls »

MaDDoX

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 165
    • View Profile
    • FluidPlay Studios
Re: Lives & Local Scoring?!??
« Reply #1 on: April 10, 2011, 02:18:44 PM »
D000d... you're asking how to make a full game with PlayMaker, that'd take a whole fricken tutorial :) Anyways, I'll give you some hints.

Quote
Question One: How can I have it where a game object has 3 lives and when it collides with a trigger loses a life before respawing to set location? Also displaying a counter on screen.
Don't put your lives in the "character" game object, or else when you destroy it you'll lose track of your lives. I'd recommend you having one main FSM attached to one object (call it "gamedata" or "gamevar") at the root of the scene. Put your main or global variables there, in your case create a "playerlives" integer variable and initialize it with the value of 3. At your character Game object add an FSM and set it up like this:


Then in your main gamevar object create and add an event named "ePlayerWasHit" to the initial state, which adds -1 (ie. subtracts one) from the playerlives variable. As for question two, you can use a similar approach, just add some GUI actions to your main FSM ("gamevar" in my example).

Quote
I have EzGUI and Sprite Manager if that makes a difference??
There aren't EzGUI or Sprite Manager actions publicly available for Playmaker as of yet, although I'll be working on some for SpriteManager 2 this week and intend to release it publicly. Anyways, I don't see the need for them on such a simple scenario, simply use the new GUI system/actions available in Playmaker 1.1.

Hope this is of some use for you and other novices. Good luck, Bilko!
« Last Edit: April 10, 2011, 02:20:32 PM by MaDDoX »
--
Breno "MaDDoX" Azevedo
@brenoazevedo

Col. Phil Bilko

  • Playmaker Newbie
  • *
  • Posts: 45
    • View Profile
Re: Lives & Local Scoring?!??
« Reply #2 on: April 12, 2011, 01:30:08 AM »
D000d... you're asking how to make a full game with PlayMaker, that'd take a whole fricken tutorial :) Anyways, I'll give you some hints.

Hahahaha actually sorry I was not to clear, I HAVE made a cool fun little game so far using Playmaker, just needed a couple questions answered in regards to the above post, which you have answered for me.... Thanks ever so much! Now time to implement those new lives into the game :D

Regards;

Bilko