Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: wheretheidivides on January 18, 2015, 02:24:56 AM

Title: Random INT (No back to back)
Post by: wheretheidivides on January 18, 2015, 02:24:56 AM
I'd like to see the random also have included a box that you can select that says:
"Allow Back-to-Back".  When not checked, the next random number will not be the same as the previous.  So if the random INT picked 5, then the very next time it can not pick 5.  The same number would not be picked back to back.  So maybe it would store it in a variable and would look to see what the last variable was or something.  Not really usefull for floats, but intergers, yeah.

So yeah, it's not completely random, but then again what is?  Would be a cool addition.
Title: Re: Random INT (No back to back)
Post by: Lane on January 26, 2015, 10:42:27 AM
You could just do a compare and if it is the same as the last random then redo it.
Title: Re: Random INT (No back to back)
Post by: wheretheidivides on January 26, 2015, 01:23:31 PM
"You could just do a compare and if it is the same as the last random then redo it."

I know, BUUUUUUT these are the things that makes playmaker better and better.  Ideas.
Title: Re: Random INT (No back to back)
Post by: djaydino on January 26, 2015, 07:09:41 PM
i am working on it but still having a problem on it

for now you can use "random weighted" int or maybe "send random event",
the have both a no repeat function

or wait a bit for my action :)
Title: Re: Random INT (No back to back)
Post by: wheretheidivides on January 26, 2015, 07:40:54 PM
"i am working on it"

You guys are amazing.  Unity's forems are full of selfish, troll children with elitists attitudes.  Playmaker forems are full of nice, cool helpful people.  Personally, I could script the check myself, but for the betterment of everyone, this would be a great addition.  As I see stuff like that, I post it because down the road people will be looking for these things and will be amazed.  I know I know. 

Good job
Title: Re: Random INT (No back to back)
Post by: djaydino on January 26, 2015, 10:33:50 PM
Hi,
I enjoy making actions, i learned a lot about C# since i started making Actions.

maybe you can see whats wrong with my script of not you can still follow if i got it fixed :)
you can see it here (http://hutonggames.com/playmakerforum/index.php?topic=9363.0)

you can always make and share actions when you are interested you can start by looking here (https://hutonggames.fogbugz.com/default.asp?W166)

friendly greetings,

Dino
Title: Re: Random INT (No back to back)
Post by: wheretheidivides on January 26, 2015, 11:24:27 PM
I don't know C# but do know javascript.  If that page has a quick tutorial on how to make actions with JS, I would give it a go.
Title: Re: Random INT (No back to back)
Post by: djaydino on January 27, 2015, 07:24:08 AM
hi, i got the action working now.

You can find it here (http://hutonggames.com/playmakerforum/index.php?topic=9371.0)

i would recommend you to try C#
i came from java and must say i am happy i did changed to C# :)

friendly greetings,

Dino