playMaker

Author Topic: If x Points achieved you can collide with object  (Read 1306 times)

soccergames

  • Playmaker Newbie
  • *
  • Posts: 4
If x Points achieved you can collide with object
« on: September 06, 2017, 03:43:58 PM »
I'm new to playmaker. I have done the point system for my game but now I'm trying to do end of level which is once you have x points you can go to door which should check if you have x amount then proceed to next level.

Right now I've been trying to do INT compare for the door to see if point is greater than X then let user collide with it.. but its not working out.

Any tips?

Deek

  • Full Member
  • ***
  • Posts: 133
Re: If x Points achieved you can collide with object
« Reply #1 on: September 07, 2017, 03:45:20 PM »
The Quick Way
Set your Int Compare action to run every frame, but that's not very efficient.

The Proper Way
Whenever you get points you also send a global event to the state with the Int Compare action.

At the bottom of the PlayMaker Editor you also have the option "Debug" (above "Hints [F1]"), which shows you the runtime value of your int under the variable so you can check if it actually compares the right value.
If it stays 0 you likely need to make it global (right-click on it under the 'Variables' tab and make it a global variable), also make sure that everywhere you've used that variable to set it to the global variable.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: If x Points achieved you can collide with object
« Reply #2 on: September 07, 2017, 08:14:06 PM »
Hi,
Here is a video about global events/transitions that can be useful :