Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Col. Phil Bilko on April 13, 2011, 08:20:30 AM
-
Hello all;
How would I have a button once clicked to quit the app? I have the button setup, just having an issue with triggering this... All help would be appreciated.
Thanks in advance.
Bilko
-
Hi,
I can't find any pre made actions for this. If there is then can someone point it?
Meanwhile, I scripted one. You can get the code here http://hutonggames.com/playmakerforum/index.php?topic=113.0 (http://hutonggames.com/playmakerforum/index.php?topic=113.0)
1: In your project Panel, open Playmaker/Actions/
2: Create a new c# script
3: Rename it ApplicationQuit
4: copy the code from the link above
5: select your button fsm
6: Select the State that needs to quit the app
7: browse the actions under the GameLogic tab and select ApplicationQuit and add it to your State
8: now if you run, and reach that State, it will quit the application.
If you have any questions, do not hesitate:)
Bye,
Jean
-
PERFECT!!!!
Thanks ever so much! Works like a charm! (God I need to learn code hahaha)
Regards;
Bilko
-
Nice jeanfabre! Guys, if it isn't asking much, could we add all new actions to the proper section (http://hutonggames.com/playmakerforum/index.php?board=19.0) and just link to them in the questions that required them? That'd make things easier to find/maintain (in case some bug is found or you want to update the action) and tidier.
Thanks!
-
Done,
I whish we had some better official wiki system, cause even if it goes in the right section, maintaining code base in a forum is just wrong anyway.. but yes, in the right section now :) Obviously, the team is really busy and can't really afford playing on all sides, so if they'd let us build up a proper code base and documentation as we discuss things, double win!
Bye,
Jean
-
We're working on a public section on the playmaker wiki... should be up tonight!