Help with difficult move actor

Hello , I have a problem , i want that my hero start to move when he appears on scene, I need that he start to move when the key right is up and when the key right is down the first time, but when i touch right again i want that when the key right is up he would be able to stop, thanks, i hope you can help me .

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    What is the 'key right' ?
  • agueisagueis Member Posts: 420
    edited December 2013
    Hello, Is move right, right key
  • bjandthekatzbjandthekatz Orlando, FlMember Posts: 1,375
    From what I can tell you want him to move when the right key is down and when it is up for him to stop.

    add a rule:
    when key right is down
    Timer: every 0 seconds
    change attribute self.motion.linearvelocity.x to self.motion.linearvelocity.x+400
    Otherwise
    change attribute self.motion.linearvelocity.x to 0
  • agueisagueis Member Posts: 420
    I explain, This hero is a spawn actor, when he appears i want that he start to move when the key right is down or the key right is up, but i only want that he move this way only when he appears, later i want that the key right has a normal move , when is up stop and when is down move.
  • agueisagueis Member Posts: 420
    I explain better, I have a hero , when he collide with an actor he have the rule of destroy and spawn actor, the new actor appears, but although i have the key right down he does n´t move i have to put the right key up and down to make he move, i want that when the hero appears and i have the right key down he start to move
  • bjandthekatzbjandthekatz Orlando, FlMember Posts: 1,375
    I still dont fully understand what you are trying to do.
    Let me know if this is what you needed:
  • agueisagueis Member Posts: 420
    When my hero touches an object begins to walk the roof, when touching the object the hero is destroyed, and appears with another hero spwan actor who walks in the roof, but when it appears the new hero , happens what i commented before, greetings

    Sorry for my English
  • agueisagueis Member Posts: 420
    Thanks very much for the zip,
    It is almost what I want to do, as well as in the example but don't stop, I just want to stop when the right key is not pressed
Sign In or Register to comment.