The attribute bounces back?!?

So..I created a game attribute called 'sprite-speed' and gave it '95' as the value. If mouse overlaps or collides with 'x' then change attribute 'sprite-speed' to '50' for 15 seconds, after 15 seconds set it to 95. But after it overlaps the speed changes for 3 seconds < and changes back to 95...why is that? What are the possible problems?

Comments

  • jsorr2jsorr2 Member Posts: 279

    so you have a rule:

    if actor collides with mouse:
    timer for 15 seconds (run to completion -> true)
    Change sprite-speed to 50)

    Else
    Change sprite-speed to 95

    Make sure run to completion is checked.

  • circlelinecircleline Member, PRO Posts: 37

    I did what you told and it doesn't work...Update: I found the problem but how do i fix it? The problem is that I set, If 'pausemenu' is true set 'speed' to 0, else to '95'...This might be overlapping and how do i not make it overlap?

  • zweg25zweg25 Member Posts: 738

    Get rid of the else change speed to 95 in the pause menu rule. Then put that first rule you had in the else.

    That may be confusing, if it is let me know and I will explain it better

    Hope that helps

    zweg25

  • SocksSocks London, UK.Member Posts: 12,822

    @circleline said:
    . . . change attribute 'sprite-speed' to '50' for 15 seconds

    >

    after 15 seconds set it to 95

    A change attribute behaviour only triggers once, placing it inside a 'for' timer will have no effect on it.

Sign In or Register to comment.