playMaker

Author Topic: Thirty Custom Action in Thirty Days: Simple Loop Counter  (Read 3416 times)

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Thirty Custom Action in Thirty Days: Simple Loop Counter
« on: March 31, 2017, 11:45:54 AM »
Over the next thirty days, I am going to try and write thirty custom actions (as a way to help improve my own coding skills). Hopefully I will have time to also make youtube videos to go along with them.

First days action can be downloaded here: https://github.com/dumbgamedev/general-playmaker/blob/master/Math/simpleLoopCounter.cs

Its a simple loop counter. While you can make your own loop counter in playmaker, this one works out of the box. Set a max count number, the current count number and even the count amount (can count by 2, 3, 4, etc). Events exist for different outcomes.



Ive created a short video explaining the action and give an example of how to use it:
If you like the video, please don't forget to "like" it on youtube. Thanks!  8)

terri

  • Sr. Member
  • ****
  • Posts: 386
    • terrivellmann.tumblr.com
Re: Thirty Custom Action in Thirty Days: Simple Loop Counter
« Reply #1 on: April 02, 2017, 05:40:55 PM »
Cool! Does it work any differently than the Iterate action?

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Re: Thirty Custom Action in Thirty Days: Simple Loop Counter
« Reply #2 on: April 02, 2017, 11:45:42 PM »
Darnit. Nope, looks just about the same. I think the only difference is Iterate does not have an event for over the max number. I did not see iterate  ::) In the past I just used an int add and made my own loop counter with a few different actions.

Oh well.

I am trying to check that my actions don't exist before I make them, but sometimes its hard to find them by name.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Thirty Custom Action in Thirty Days: Simple Loop Counter
« Reply #3 on: April 03, 2017, 06:48:20 AM »
Hi,

 ping me if you have an idea for a new action, I'll double check. Also, search the Ecosystem for something similar before, if you are not sure about the right keywords, let me know too :)

 Bye,

 Jean

terri

  • Sr. Member
  • ****
  • Posts: 386
    • terrivellmann.tumblr.com
Re: Thirty Custom Action in Thirty Days: Simple Loop Counter
« Reply #4 on: April 03, 2017, 09:34:49 AM »
Darnit. Nope, looks just about the same. I think the only difference is Iterate does not have an event for over the max number. I did not see iterate  ::) In the past I just used an int add and made my own loop counter with a few different actions.

Oh well.

I am trying to check that my actions don't exist before I make them, but sometimes its hard to find them by name.

Ah! It happens, I've done this a few times myself
I try to look at it as a learning experience at least!

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Re: Thirty Custom Action in Thirty Days: Simple Loop Counter
« Reply #5 on: April 03, 2017, 11:07:25 AM »
Totally. The whole 30 actions in 30 days is all about learning more  8)
I am new to programming, so just improving my skills and having some fun.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Thirty Custom Action in Thirty Days: Simple Loop Counter
« Reply #6 on: April 04, 2017, 02:31:41 AM »
Hi,

 yep, no worries at all! we welcome all contributions indeed, even if it's duplicate, The Ecosystem is lacking several important features and finding duplicates is tricky, so yes, please don't stop :) even if you hit few duplicates, it's always good, and actually, what you should do is editing the current iterate action and add the keywords "Loop" and "Counter", because each ecosystem search look for the script text and iterate is very technical and of course if you don't know that word nothing comes up in the browser...

Bye,

 Jean