Help please - Do an action with timer

I want to let an actor do an action every time, if in 3 seconds nobody press the actor, could you help me?

Comments

  • KevinCrossKevinCross London, UKMember Posts: 1,894
    How about something like

    If Actor Is Touched
    Do Nothing
    Otherwise
    Every 3 Seconds
    Do something
  • Tiny_StudioTiny_Studio Member Posts: 50
    My actor does something when is touched, and if is not touched for 3 seconds, it will do the same action
  • -Timo--Timo- Member Posts: 2,313
    edited August 2013
    then change the 'do nothing' in @KevinCross his comment to action you want?
  • Tiny_StudioTiny_Studio Member Posts: 50
    Sorry, but i want the actor do the action when it's touched, and do again the action in 3 seconds if it's not touched
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    It might not be exactly 3 seconds afterwards but this might give you want you want

    If Actor Is Touched
    Set Self.Touched = True (this is an attribute)
    Do something
    Otherwise
    Every 3 Seconds
    If Self.Touched = True
    Do something again
    Set Self.Touched = False

    Does this make sense?

    It's horrible writing code on these forums!
  • -Timo--Timo- Member Posts: 2,313
    Sorry, but i want the actor do the action when it's touched, and do again the action in 3 seconds if it's not touched
    aaah ok xD then what @kevinCross said should work

  • Tiny_StudioTiny_Studio Member Posts: 50
    Ok, thank you :)
  • joshiwujoshiwu Member Posts: 207
    Also you can make an attribute to hold your timer. And make a timer every 1 second change timer to timer+1.
Sign In or Register to comment.