playMaker

Author Topic: Add Based on points...  (Read 3215 times)

NinjaX

  • Full Member
  • ***
  • Posts: 113
  • XCO is the ULTIMATE IOS Ninja!!
    • XCOGAMES
Add Based on points...
« on: August 06, 2013, 09:53:25 PM »
Hello I am wondering if anyone can tell me something that may be actually simple.... Right now I have a point system, And I want to know How do I say to the game

If 400 points have been collected (added tot this int)

Add an extra life (on this int)

I have a global variable set for points and lifes...

Any help would be greatly appreciated :)
XCO is the ULTIMATE IOS Ninja, Beware for he sees Everything and Nothing all at once!

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: Add Based on points...
« Reply #1 on: August 06, 2013, 10:32:02 PM »
Take a look at int compare, you can check if the score is equal, less than or more than a value. From that you can move into another state to add the life. Setting it to everyframe and having no event for less than will keep it checking the score everyframe til it is above.

NinjaX

  • Full Member
  • ***
  • Posts: 113
  • XCO is the ULTIMATE IOS Ninja!!
    • XCOGAMES
Re: Add Based on points...
« Reply #2 on: August 07, 2013, 11:51:19 AM »
TY so much dude Im going to try that today! I wanted to use int compare I am using it for my other point system, But I think something went wrong, I will try your suggestion today!

TY dude :D

May I ask should it be the two variables or one variable at the top and than the number by which it increases like 400 ? at the bottom ?
XCO is the ULTIMATE IOS Ninja, Beware for he sees Everything and Nothing all at once!

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Add Based on points...
« Reply #3 on: August 07, 2013, 12:42:19 PM »
you would need a variable that it is constantly being checked and compare that to 400 and say if my variable is equal to 400 go to new state which resets it back to 0 (set int value), add an extra life to the life variable (int add) and a (next frame event) to start checking again.
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