Help With Timer

3d103d10 Member Posts: 471
edited November -1 in Working with GS (Mac)
I want to spawn my Actor after every 10 seconds.I put the timer behavior to that actor and put the spawn rule in the timer selecting that actor.But nothing happens.

ANd i want these actors spawn randomly.

Comments

  • calvin9403calvin9403 Member Posts: 3,186
    can you take a pic about your rule?
  • 3d103d10 Member Posts: 471
  • 3d103d10 Member Posts: 471
  • quantumsheepquantumsheep Member Posts: 8,188
    There was no need to make the other two threads that I've deleted was there?

    QS

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • 3d103d10 Member Posts: 471
    pls help
  • olster1olster1 Member Posts: 396
    I cant tell exacly what your doing from your description but heres what I think your doing wrong. You dont put the spawn rule in the actor you want to spawn. As that actor is not on your scene in the first place it wont do anything. You need to create another actor and put the spawn rule in that (delete the spwn rule from traffic2. Then you drag the actor with the spawn rule onto the scene. If you dont want this spawner actor to be visible uncheck visible under the graphics option and uncheck movable in the physics options.

    I can see how you misunderstood how the rule works.
    Hope this helps
  • ValanValan Member, BASIC Posts: 410
    I tend to reserve an actor that is on the stage at all times and it's job is to look after the housework, so to speak. As Olster1 says it is for another actor to Spawn. Try using a "Controller" actor to Spawn your plane.

    There are several ways to set up randomness. You can use Controller for this also if it is math based. A timer can be set up to pass the new planes the random position as they need it.

    On way I did random bombs to appear was to have an invisible shooter that moved to and fro along the x axis and shot an invisible dart at specific intervals and the randomness came with the stopping of the darts. A visible bomb was spawned by the dart. This allowed me control of the initial positioning. Sometimes you don't want things to be too random that it gets in the way of gameplay. I think a degree of programmer control is always needed.

    What about the direction of movement? If it is too random you may get planes that start on the edge and move off screen immediately.

    Hope this helps.

    Cheers

    Valan
  • 3d103d10 Member Posts: 471
    Thanks guys for your help.
Sign In or Register to comment.