Playmaker Forum

PlayMaker Help & Tips => PlayMaker Tutorials => Topic started by: dreamlarp on November 06, 2013, 02:07:09 AM

Title: Turning off and on add-ons
Post by: dreamlarp 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?
Title: Re: Turning off and on add-ons
Post by: Lane 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.
Title: Re: Turning off and on add-ons
Post by: dreamlarp 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?
Title: Re: Turning off and on add-ons
Post by: Lane on November 06, 2013, 10:17:56 AM
Use Set Property and toggle Enabled.
Title: Re: Turning off and on add-ons
Post by: dreamlarp 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?
Title: Re: Turning off and on add-ons
Post by: Lane on November 06, 2013, 10:47:09 AM
Yes, basically.
Title: Re: Turning off and on add-ons
Post by: dreamlarp 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.