playMaker

Author Topic: Turning off and on add-ons  (Read 2123 times)

dreamlarp

  • Playmaker Newbie
  • *
  • Posts: 33
    • View Profile
    • Bionic Marine Command Space FPS WIP
Turning off and on add-ons
« on: November 06, 2013, 12:07:09 AM »
I am planning on an ingame store that will offer things like raidar (mini-map)
https://www.assetstore.unity3d.com/#/content/3977

How would I activate this and deactivate this and other add-ons with playmaker?
Bionic Marine Command Space FPS WIP
http://spacedwarves.blogspot.com/

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2488
  • Yup.
    • View Profile
    • Cleverous
Re: Turning off and on add-ons
« Reply #1 on: November 06, 2013, 05:04:53 AM »
Put the FSM in a wrapper object and create it when they buy it from the store, then delete it when they sell it.

Or if its a permenant but 'grey' feature then just leave it created all the time and have a disabled state in which it doesn't work, when they buy it then it just signals to turn on the radar by sending and event.

dreamlarp

  • Playmaker Newbie
  • *
  • Posts: 33
    • View Profile
    • Bionic Marine Command Space FPS WIP
Re: Turning off and on add-ons
« Reply #2 on: November 06, 2013, 08:06:34 AM »
Found this..
KGFMapSystemSetMinimapState      Enable/Disable display of the minimap.
Thank you. now what about disabling an attached script?
In the UFP Kit you can enable all weapons and amo by not attaching the simple inventory to the player object. Can attached scrips be turned off for a time period?
Bionic Marine Command Space FPS WIP
http://spacedwarves.blogspot.com/

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2488
  • Yup.
    • View Profile
    • Cleverous
Re: Turning off and on add-ons
« Reply #3 on: November 06, 2013, 08:17:56 AM »
Use Set Property and toggle Enabled.

dreamlarp

  • Playmaker Newbie
  • *
  • Posts: 33
    • View Profile
    • Bionic Marine Command Space FPS WIP
Re: Turning off and on add-ons
« Reply #4 on: November 06, 2013, 08:41:02 AM »
Thank you. I will look up how to changing that after they leave the level also. I will need to turn on many scripts and components when the level starts and off when they leave.

So I take it that I would need to attach all of these things and have them turned off by default and only turn them on if a flag is sent from the main menu?
Bionic Marine Command Space FPS WIP
http://spacedwarves.blogspot.com/

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2488
  • Yup.
    • View Profile
    • Cleverous
Re: Turning off and on add-ons
« Reply #5 on: November 06, 2013, 08:47:09 AM »
Yes, basically.

dreamlarp

  • Playmaker Newbie
  • *
  • Posts: 33
    • View Profile
    • Bionic Marine Command Space FPS WIP
Re: Turning off and on add-ons
« Reply #6 on: November 06, 2013, 09:02:05 AM »
Good deal.
Using the UFP Kit and playmaker is not that hard making the basic game part. Its the added stuff that takes some learning. Since I don't have a level designer the levels are harder than this stuff really.
Bionic Marine Command Space FPS WIP
http://spacedwarves.blogspot.com/