playMaker

Author Topic: Collectables, Player Prefs and Cameras [SOLVED]  (Read 1714 times)

adamrobertson

  • Playmaker Newbie
  • *
  • Posts: 9
Collectables, Player Prefs and Cameras [SOLVED]
« on: August 14, 2013, 02:38:08 PM »
Hi Everyone,

I've been using playmaker for a while and it's a great system.

I have however reached a stopping point and am completely stuck.

I have 2 problems.

The first is a camera issue. My camera is a standard spring follow camera. What i want is that when you run through a certain area you can change the height and distance var's, i have been trying to use the get / set property but the options to edit these var's don't appear? maybe this is completely the wrong thing?

The second is a bit more complex. I have a collectables script (Coins in this case) When you collect them they are stored in player prefs and carry through scenes which is great but when i 'for example' go back into a previous level the coins re appear. How can i make the coins not appear again even when the level is reloaded?

Any help or ideas on these two issues would be great, I have gone through so many tutorials and crawled the internet but have had no luck

Thanks in advance,

Adam
« Last Edit: August 16, 2013, 08:46:02 AM by adamrobertson »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Collectables, Player Prefs and Cameras
« Reply #1 on: August 16, 2013, 08:28:30 AM »
Hi,

 Your first issue is that you are likely dragging the gameobject itself instead of the component. Drag the component toolbar and then it will know that you want to get or set that specific component.

As for the coins, Each coin shoudl be assigned a unique ID and when the user check that coin, save that this coin is taken so that when the scene reloads, each coins check whether they should disappeary. OR you have a manager that enables coins that are not yet taken. In that casem you would edit your level with some placeholders whee coins should be instanciated, and these placeholders would have a unique Id.

Bye,

Jean