Spawning an actor with changing intervals

bubrisbubris Member Posts: 1
edited November -1 in Working with GS (Mac)
Hi there
I'm trying to spawn an actor multiple times with a changing interval in between.
for the first 100 spawns I want to have it spawn every random(1.8,2) seconds, and then for the next hundred spawns I want a faster spawn rate, but the "every" function seems to just take the first value passed to it and use that for the rest of the program. Any solutions?
Much Appreciated
Bubris

Comments

  • perfectanswerperfectanswer PRO Posts: 121
    hmm,
    make an Actor to a Prototype, then you can use over `CurrentScene.Time` a timer in seconds.
    Or..
    Use an attribute as SpawnCounter and an Attribute for a baseTime and a MultiplierAttribute

    Rule
    If Spawncounter >=100 and <200
    Change Attribute --> MultiplierAttribute(2 or 0.2 or whatever you want)
    ...and so on

    Rule
    If Spawncounter < 100
    Timer --> Every baseTime * MultiplierAttribute

    If Spawncounter >=100 and <200
    Timer --> Every baseTime * MultiplierAttribute
    ...and so on
  • MotherHooseMotherHoose Member Posts: 2,456
    Rule when spawnCount < 100
    ---your timer Every random #
    -------spawn
    -------changeAttribute game.spanCount to game.spawnCount+1

    new Rule when spawnCount ≥ 100
    ---your timer Every random
    --------spawn

    (putting the second random timer in Otherwise for first Rule... doesn't seem to work...computer stops reading after 1st condition is no longer valid... seems to me at least on integer attributes...)

    MH
Sign In or Register to comment.