How can I speed up a timer that spawns an actor?

2»

Answers

  • Triangularity GamesTriangularity Games Founder/Owner MarylandMember Posts: 140

    @Socks said:
    stephenriska123 said: in the instance of a wall it says timer every 1 second (not even an attribute) spawn actor (actor) in direction 0 relative to actor at position -15, random(125, 425) relative to scene...this worked before and then i started changing things and now it doesnt work anymore

    it all works great now. you have been the greatest help. thank you so much and have a happy holiday o:)

  • tintrantintran Member Posts: 453
    edited July 2015

    I was running into similar situation where I wanted to make the timer speeds up but i wasn't speeding up, I think it was because the "Every" timer is only created once with one value and that's it it doesn't use the updated timer (my timer is called ball_timer).
    So what I did was i deleted the timer and added an actor real variable called "last_time"
    and added a rule
    if (self.time - last_time) > ball_timer
    do
    spawn ball
    set last_time to self.time
    so whenever i updated ball_timer to be smaller it would speed up.

  • Triangularity GamesTriangularity Games Founder/Owner MarylandMember Posts: 140

    @tintran said:
    I was running into similar situation where I wanted to make the timer speeds up but i wasn't speeding up, I think it was because the "Every" timer is only created once with one value and that's it it doesn't use the updated timer (my timer is called ball_timer).
    So what I did was i deleted the timer and added an actor real variable called "last_time"
    and added a rule
    if (self.time - last_time) > ball_timer
    do
    spawn ball
    set last_time to self.time
    so whenever i updated ball_timer to be smaller it would speed up.

    Yeah. You need to continuously respawn the spawner (timer) so it updates the value each X ammount of seconds. But i got it all figured out. Thanks for the support

Sign In or Register to comment.