playMaker

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

dreamlarp

  • Playmaker Newbie
  • *
  • Posts: 33
    • Bionic Marine Command Space FPS WIP
Turning off and on add-ons
« on: November 06, 2013, 02: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: 2511
  • Mender of the past
    • Cleverous
Re: Turning off and on add-ons
« Reply #1 on: November 06, 2013, 07: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.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

dreamlarp

  • Playmaker Newbie
  • *
  • Posts: 33
    • Bionic Marine Command Space FPS WIP
Re: Turning off and on add-ons
« Reply #2 on: November 06, 2013, 10: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: 2511
  • Mender of the past
    • Cleverous
Re: Turning off and on add-ons
« Reply #3 on: November 06, 2013, 10:17:56 AM »
Use Set Property and toggle Enabled.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

dreamlarp

  • Playmaker Newbie
  • *
  • Posts: 33
    • Bionic Marine Command Space FPS WIP
Re: Turning off and on add-ons
« Reply #4 on: November 06, 2013, 10: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: 2511
  • Mender of the past
    • Cleverous
Re: Turning off and on add-ons
« Reply #5 on: November 06, 2013, 10:47:09 AM »
Yes, basically.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

dreamlarp

  • Playmaker Newbie
  • *
  • Posts: 33
    • Bionic Marine Command Space FPS WIP
Re: Turning off and on add-ons
« Reply #6 on: November 06, 2013, 11: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/