Thought I had this figured out

bluebyu25bluebyu25 Member Posts: 500
edited November -1 in Working with GS (Mac)
So a week or two ago I posted on this (Couldnt find it otherwise I would bump it) but basically what I thought was a solution was anything but.

The problem is that I cannot make a recycled actor adhere to a timer once its been recycled. So I have an actor and every random 3-6 seconds it changes velocity (or move to, accelerate wont work, tried interpolate,etc.) and once it is pressed it changes its X,Y value back to the top of the screen but then it will immediately move back down....i cant for the love of all that is good and decent figure out how, once it is pressed, not move again for the random 3-6 seconds.

Now I am off to fold my wife's laundry since shes working away at the hospital all night, and when I get back, if someone has this resolved I will do 36 consecutive backflips. Maybe even 37, maybe.

Cheerios

Comments

  • StuartYStuartY Member Posts: 134
    I'm not 100% sure what your situation is, but I think I may have solved a similar problem today. Try using a variable and a rule which adds a random number to that variable (e.g. 5-10) every 0.5s . Then, trigger your actor to move down when the variable hits 60 or over. When your actor is pressed, reset the variable. This might bypass issues you're having with the timer.
  • bluebyu25bluebyu25 Member Posts: 500
    That and another issue is its velocity carrying over. I even had it set to where its angular velocity with be set to 0 when pressed and still nothing.

    EDIT: It really boils down to this, is there a behavior or way to RESET A TIMER within an actor. Long story short I did some tests and my timer just keeps going, so obviously I cant do every random 1-5 seconds because 1-5 seconds has already passed and then it acts bizarre.
  • SnowAppleMintSnowAppleMint Member Posts: 23
    Could you explain what it is you are trying to accomplish a little more?
    I am not sure I understand your problem...but it sounds like you want the timer to reset upon being pressed?
    could you not just restart the timer that way. Create a rule: once pressed set time to zero.
    Or is your timer independent of the actor?
  • bluebyu25bluebyu25 Member Posts: 500
    My timer is independent of the actor. Besides this I ran into another problem which is I set up a rule on all my gameplay actors that if self.position y is < or = to 310 pixels, collide with other gameplay actors with tag. But for some reason even if they are above 320 pixels, they still collide anyways and I cant stop it.

    Rough day for me on the programming side lol

    EDIT: Solved my new problem by constraining X,Y attributes. One down, one to go.
Sign In or Register to comment.