playMaker

Author Topic: How to generate random numbers with a seed? [SOLVED]  (Read 2270 times)

Raika

  • Playmaker Newbie
  • *
  • Posts: 30
How to generate random numbers with a seed? [SOLVED]
« on: November 28, 2017, 05:12:12 AM »
I'm creating multiplayer game with big world. To create objects in game i'm using basic action Random int like that: starting from 0,0 add RanX(2-10) and RanY(0-4 reset Y on object add), when X go 3000, reset X to 0 and add 5 to Y. I don't wanna send this all information thru web because bandwidth limit, I would like to send only seed.

Is it possible to generate numbers in this way using a seed?

« Last Edit: November 30, 2017, 05:41:18 AM by Raika »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: How to generate random numbers with a seed?
« Reply #1 on: November 28, 2017, 05:22:28 PM »
Hi,
I made a action for you to set the seed.

First you would need to do a random int to get a seed nr,

Then you can use the action i made to set the seed (attached below)

I tested it a bit and it seems to work, can you confirm if it works, i can place it on the ecosystem then.
« Last Edit: November 29, 2017, 05:08:15 PM by djaydino »

Raika

  • Playmaker Newbie
  • *
  • Posts: 30
Re: How to generate random numbers with a seed?
« Reply #2 on: November 29, 2017, 03:47:47 AM »
I can see only ecosystem link, can you post once more?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: How to generate random numbers with a seed?
« Reply #3 on: November 29, 2017, 05:07:56 PM »
Hi,
Oops i forgot to add the attachments sorry for that :)

here it is now :)

Raika

  • Playmaker Newbie
  • *
  • Posts: 30
Re: How to generate random numbers with a seed?
« Reply #4 on: November 30, 2017, 05:40:51 AM »
Thanks for help Everything works, if i manage to break something i will contact you on priv.

You can add to description something like that: This action has impact on all FSM but any other random action will pick NEXT number from pool, Call second time to reset.