Event on time

SuperbucSuperbuc Member Posts: 17
edited November -1 in Working with GS (Mac)
Hi,
I need an attribute CAN (but not necessarily) change each some time, example after 100 seconds game time. This is because I've read that I cannot connect with telephone time.

I can do an attribute that tells to change after the game time is > 100, but it must be changeable after 200/300/400... so on.
The change must not be in the same scene, but in a separated one. So I cannot use time scene.

Hope this is clear, it must be changeable only after some time, and after repeating of this amount of time, not before.

Any ideas ? Thank you

Comments

  • old_kipperold_kipper Member Posts: 1,420
    If I understand you correctly then you can create a integer attribute called 'can', then place a timer in an actor that says "every>100 seconds" change attribute game>can to game can+1", and make the events allowable based on rules that are dependant the number of game 'can'.

    Hope that helps kipper
  • CaptFinnCaptFinn Member Posts: 1,828
    will that roll over into the next scene though? if he is in scene 1 for 180 secs will 20 seconds into scene 2 activate that rule 180+20 being 200 Seconds of course.
  • old_kipperold_kipper Member Posts: 1,420
    If he wants it to roll over to the next scene an easy way to do it is to have a rule on an actor in each scene that checks the game time every second and makes the events conditional on the elapsed time of the game. Something like rule if game time>99 & time<200.

    Maybe it should be done that way anyway....
  • SuperbucSuperbuc Member Posts: 17
    It's not this, I just want that an attribute can change only after some time elapsed, and not each time you press a button, as example.
    In this case it's meteo conditions. If you press the button of meteo page, game random a value of meteo (sun, rain, so on).
    This applies on your game.
    If you press again meteo, to load the page with meteo (and to see how is weather), the attribute changes only after a minimum amount of seconds. As example, few hours.

    As is now, each time you press meteo button, it changes, and it's not right.

    I'll try to adapt post of old_kipper, but not sure it will work.
    Hope this is more clear.

    Of course meteo is not related with a screen of the game.

    Obviously it could be more simple if I could take time from iPhone. Each day, weather changes... But is not possibile.
  • SuperbucSuperbuc Member Posts: 17
    Seeing your post I've had an idea, just now.
    Maybe I can save attribute time.weather (first time is = to game.time) and allow the next change only if, after loading time.weather, rule sees that actual time.weather>game.time+100

    In this case have I to use change attribute or constrain attribute?

    change attribute weather.time = game.time ?
    constrain attribute weathr.time=game.time ?

    Could be a solution ?
  • Rob2Rob2 Member Posts: 2,402
    image

    if you make cando a real attribute equal to 100 then this would spawn every 100 seconds from the start of your game..
  • SuperbucSuperbuc Member Posts: 17
    Rob, I've done many test before reply, but it doeasn't work for me.
    The problem is that if I put this rule in an actor, and the actor in a scene, each time I come back in a scene, it begin again.

    I try to explain better.
    My game is related to meteo (sun, rain...). I need that meteo changes each predefined amount of time, but it must change for the whole game, not only in a scene, and not from zero each time I change scene.
    This value must be independent from the game (as the gama.time is, for example).
    I've tried many different ways to do, but I cannot reach a solution.
    Hope you can help me with any new idea... !

    Thank you in advance.
Sign In or Register to comment.