playMaker

Author Topic: Int, Float, GameObject If/Else if/Else Action  (Read 1257 times)

darkhitori

  • Playmaker Newbie
  • *
  • Posts: 6
    • View Profile
Int, Float, GameObject If/Else if/Else Action
« on: September 26, 2015, 11:22:45 PM »
Artist here and beginner programmer messing around with some code and Modified the Float Compare 2 and GameObject Compare Action into If/Else if/Else Actions.....Hopefully other beginners will find this easy to use in developing their games!!!........Enjoy  ;)








jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: Int, Float, GameObject If/Else if/Else Action
« Reply #1 on: September 29, 2015, 02:02:42 AM »
Hi,

 Thanks for contributing, but I would suggest one thing to avoid the typical issue with this types of actions, what if you want yet another if statement....

so I suggest you make an array of if statments, and so for a given action the developer can have as many elses than needed.

 For code examples on how to provide arrays within actions, check out "SelectRandomColor" for example.

 Bye,

 Jean

darkhitori

  • Playmaker Newbie
  • *
  • Posts: 6
    • View Profile
Re: Int, Float, GameObject If/Else if/Else Action
« Reply #2 on: September 30, 2015, 08:32:10 PM »
I hear what you are saying Jean....So I took your advice and remade it like you said with an array in case people want more if statements...Just make sure the Ifs and the Operations & Send Events have the same number to evaluate. Thanks and here you go!!! ;D



IndieIconic

  • Playmaker Newbie
  • *
  • Posts: 2
    • View Profile
Re: Int, Float, GameObject If/Else if/Else Action
« Reply #3 on: April 18, 2017, 01:24:38 PM »
There was a time that I got an addon similar to this. Though I've searched through the ecosystem and forums and this is one of the only things I can find.

Does anyone know what the addon is that has an if/else structure like this? -> Or is it on the ecosystem under a package?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: Int, Float, GameObject If/Else if/Else Action
« Reply #4 on: April 18, 2017, 11:46:31 PM »
Hi,

 uhm, I can't recall anything like that, maybe with bool tests?

 Bye,

 Jean

terri

  • Sr. Member
  • ****
  • Posts: 349
    • View Profile
    • terrivellmann.tumblr.com
Re: Int, Float, GameObject If/Else if/Else Action
« Reply #5 on: April 19, 2017, 02:31:34 PM »
maybe its conditional expression?