Playmaker Feedback

NOTE: This board is no longer active and will be removed soon. Please use the Bug Report tool inside PlayMaker or the PlayMaker Forums instead. Thanks!

Links:
Online Manual
Version History
Roadmap
FAQ

system time

i would love an extra action under time that gets the local system time and date on your pc
maart Send private email
Sunday, February 27, 2011
 
 
Seems easily added... just need to make sure it works on Mac too, and doesn't break an iOS build...
Alexander Chouls Send private email
Monday, February 28, 2011
 
 
GetSystemDateTime



// (c) Copyright HutongGames, LLC 2010-2011. All rights reserved.

using System;

namespace HutongGames.PlayMaker.Actions

{

    [ActionCategory(ActionCategory.Time)]
    [Tooltip("Gets system date and time info and stores it in a string. An optional format string gives you a lot of control over the formatting.")]

    public class GetSystemDateTime : FsmStateAction

    {
        [UIHint(UIHint.Variable)]

        [Tooltip("Store System DateTime as a string.")]

        public FsmString storeString;

        [Tooltip("Optional format string. E.g., MM/dd/yyyy HH:mm")]

        public FsmString format;

        public bool everyFrame;



        public override void Reset()

        {

            storeString = null;

            format = "MM/dd/yyyy HH:mm";

        }

        

        

    public override void OnEnter()

        {

            DoGetTimestring();

            

            if (!everyFrame)

                Finish();

        }

        

        

            public override void OnUpdate()

        {

            DoGetTimestring();

        }

        

        

                void DoGetTimestring()

        {

                        storeString.Value = DateTime.Now.ToString(format.Value);

        }

        

    }

}
maart Send private email
Thursday, March 10, 2011
 
 
Thanks, maart! This will be included in the next update.
Alexander Chouls Send private email
Sunday, March 20, 2011
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz