Profile image

Randomizing Input

5,397 Yoloooooo  8 days ago

Is there a way to randomize what an input does?

For example:
Activate1 has a chance to
1. Blow up the plane
2. Something else
3. Something else

The Linear Congruential Generator (An RNG algorithm)! by SnoWFLakE0s don't seem to have a way to use the numbers generated as an input, maybe I'm just dum and it's not meant to be used as an input or I'm just dum and can't find a way to use it as an input.

... Or do I just have to use if statement. Did I just answer my own question

  • Log in to leave a comment
  • Profile image
    120 BYACT

    I use Sin(1000*(Time)) as random date, with other math change could get good result.

    +1 6 days ago
  • Profile image

    @Yoloooooo
    - There is some quote about making a deterministic computer doing random things being a crazy task
    - One such example is the input counter in one of the extremely old pokemon games (i can't remember which). The point is that differences in each play session causes rng to be different
    - Timing is also hard for players to control. But be careful of using a frame counter or timer with small windows, due to polling rate differences between the input handler and funky trees

    +1 7 days ago
  • Profile image
    5,397 Yoloooooo

    @hpgbproductions can you elaborate

    7 days ago
  • Profile image

    Trying to make randomness using a computer, absolute classic
    Pick some things that are very difficult for the player to control exactly, and use them in an equation
    Or run the linear congruential generator every frame, or something similar, and only use the result on the Activate1 frame

    +3 8 days ago