How do we make the timer use different random values?

saad1993saad1993 Member, BASIC Posts: 47

What I have come to know, is that the timer when used with the random expression, generates a single random number the first time and then uses it again and again.

Has anyone been able to make the timer actually generate DIFFERENT random values?

Comments

  • WhitePantherWhitePanther Member Posts: 72

    Timer: Every "1" second
    -Change Attribute game.timer to *random(min value,max value)

  • saad1993saad1993 Member, BASIC Posts: 47

    @WhitePanther said:
    Timer: Every "1" second
    -Change Attribute game.timer to *random(min value,max value)

    I'm sorry, I don't understand. Can you please explain that to me?

  • WhitePantherWhitePanther Member Posts: 72
    edited August 2016

    Every second the integer value will randomly change, (from 1 to 10)

  • saad1993saad1993 Member, BASIC Posts: 47

    @WhitePanther said:
    Every second the integer value will randomly change, (from 1 to 10)

    That part I understand. But how do I add a spawn actor behavior to this timer?

  • WhitePantherWhitePanther Member Posts: 72

    Create another actor in the scene then add rule.
    -When game.time = 1
    -Spawn actor

    Create anoter actor in the scene and add rule
    -When game.timer = 2
    -spawn actor

    =Create multiple actors like this and place them in multiple places. Then the actors will be spawned at random .

  • SocksSocks London, UK.Member Posts: 12,822

    The actors will be spawned at 1 second intervals.

  • SocksSocks London, UK.Member Posts: 12,822
    edited August 2016

    @saad1993 said:
    Has anyone been able to make the timer actually generate DIFFERENT random values?

    Your question can be interpreted in numerous ways, for example it looks like you could be asking for a timer to generate random numbers (for example generate a random number every x seconds).

    You don't want a timer to generate a random value, you want a timer to use a random value, the random number for your timer would be an input value, rather than the timer's output value.

Sign In or Register to comment.