Playmaker Forum

PlayMaker Updates & Downloads => Share New Actions => Topic started by: darkhitori on September 27, 2015, 02:22:45 AM

Title: Int, Float, GameObject If/Else if/Else Action
Post by: darkhitori on September 27, 2015, 02:22:45 AM
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  ;)


(http://i.imgur.com/rEAHQfG.png)

(http://i.imgur.com/Pxx2ZuO.png)

(http://i.imgur.com/NuhwyFq.png)
Title: Re: Int, Float, GameObject If/Else if/Else Action
Post by: jeanfabre on September 29, 2015, 05: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
Title: Re: Int, Float, GameObject If/Else if/Else Action
Post by: darkhitori on September 30, 2015, 11: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
(http://i.imgur.com/q2krM8W.png)
(http://i.imgur.com/B4L1lLL.png)
Title: Re: Int, Float, GameObject If/Else if/Else Action
Post by: IndieIconic on April 18, 2017, 04: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?
Title: Re: Int, Float, GameObject If/Else if/Else Action
Post by: jeanfabre on April 19, 2017, 02:46:31 AM
Hi,

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

 Bye,

 Jean
Title: Re: Int, Float, GameObject If/Else if/Else Action
Post by: terri on April 19, 2017, 05:31:34 PM
maybe its conditional expression?