playMaker

Author Topic: Random INT (No back to back)  (Read 3630 times)

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Random INT (No back to back)
« 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.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Random INT (No back to back)
« Reply #1 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.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: Random INT (No back to back)
« Reply #2 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.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Random INT (No back to back)
« Reply #3 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 :)

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: Random INT (No back to back)
« Reply #4 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

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Random INT (No back to back)
« Reply #5 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

you can always make and share actions when you are interested you can start by looking here

friendly greetings,

Dino

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: Random INT (No back to back)
« Reply #6 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.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Random INT (No back to back)
« Reply #7 on: January 27, 2015, 07:24:08 AM »
hi, i got the action working now.

You can find it here

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