How to have the reaction time of a timer vary (min,max)

Hello! I have another problem... xD
In my test environment for mechanics of a game, this is my problem.

I want to make a timer, so that after 5-10 sec, an action will occur. But I want it to change every time, or not always happen at the same time. Sorry if my explanation is confusing. Please help me! Thanks

P.S. I am #1 on the leaderboard right now and this is my second day on the forum. This shows how far stupidness can get you, this being my 3rd post in 2 days. ;D

Comments

  • Wllew4GamesWllew4Games Member Posts: 34

    Thanks for the help!

  • kobayaashikobayaashi Member, PRO Posts: 143

    Would it be helpful to you if you were to set your random timer then, once the timed event had occurred, your timer spawns a new version of itself (with a new call for a random time) and is destroyed? That way, you always have a random update of a random value to apply to your events..?

  • Wllew4GamesWllew4Games Member Posts: 34

    Thanks for the suggestion but I'm still not clear on how it works.

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

    @Wllew4Games said:
    Thanks for the suggestion but I'm still not clear on how it works.

    game.attribute 'X'

    Timer: After X seconds
    --Change X to random (5,10)
    --Do action
    --Destroy this actor
    --Spawn this actor

  • Wllew4GamesWllew4Games Member Posts: 34
    edited September 2015

    @Socks said:
    game.attribute 'X'

    Timer: After X seconds
    --Change X to random (5,10)
    --Do action
    --Destroy this actor
    --Spawn this actor

    so an example would be

    game.attribute.1
    timer:
    after 1 sec, change attribute: game.attribute.1 to random(5, 10)
    Move to 0,0
    For auto reset:
    Destroy this actor
    Spawn this actor

    Is that what you mean?

  • Wllew4GamesWllew4Games Member Posts: 34

    I got it!

  • SocksSocks London, UK.Member Posts: 12,822
    edited September 2015

    @Wllew4Games said:
    Is that what you mean?

    I'm not sure what 'For auto reset' means ?

  • kobayaashikobayaashi Member, PRO Posts: 143

    Hi @Wllew4Games - is the attached file the kind of thing you're looking for? Totally random spawning, with a sound file attached so that you can hear the randomness! :smile:

  • Wllew4GamesWllew4Games Member Posts: 34

    @kobayaashi said:
    Hi Wllew4Games - is the attached file the kind of thing you're looking for? Totally random spawning, with a sound file attached so that you can hear the randomness! :smile:

    Yes it is! Its the same thing as the video I linked to! I'm really hoping this will work with the way I want it to! :wink: Thanks for all the help!

  • Wllew4GamesWllew4Games Member Posts: 34
    edited September 2015

    Also, @kobayaashi I think my version of game salad is different then yours, but I cant seem to upgrade to what your example has... :/

  • Wllew4GamesWllew4Games Member Posts: 34

    @Wllew4Games said:
    Also, kobayaashi I think my version of game salad is different then yours, but I cant seem to upgrade to what your example has... :/

    It says some updates failed to install...

  • Wllew4GamesWllew4Games Member Posts: 34

    @Wllew4Games said:
    It says some updates failed to install...

    nvm! It update now!

Sign In or Register to comment.