When Touching an actor 1 stop Rotation of actor 2

aandiaandi Member Posts: 99
edited November -1 in Working with GS (Mac)
hi

guys one last problem before i think i can leave you be

how do you say when touching an actor stop rotation of actor 2

Comments

  • aandiaandi Member Posts: 99
    any ideas
  • aarioaario Member, PRO Posts: 256
    attributes.

    In actor 1 put when touched change att. game.touched to true (boolean)

    then in actor 2 put a rule saying when game.touched is true do nothing, then put your rotation behaviour in the otherwise part of the rule.

    And if you want your actor2 to continue rotating after you release the actor1 put game.touched = false in the otherwise part on actor1

    Hope that helps :)
    -Aaron
  • aandiaandi Member Posts: 99
    what do i put in the rule for actor s

    actor receieves event or attribute
  • aarioaario Member, PRO Posts: 256
    which one is actor s?
  • aarioaario Member, PRO Posts: 256
    actor 1 will be receives touch pressed

    actor 2 will be attribute game.touched is true
  • aandiaandi Member Posts: 99
    can you explain a bit more please
  • aarioaario Member, PRO Posts: 256
    i just did a demo for you.

    Search Stop Rotation in the creator
  • aandiaandi Member Posts: 99
    ok thanks but my rotation is

    vectorToAngle( self.Position.X - game.Mouse.Position.X , self.Position.Y - game.Mouse.Position.Y )

    is this the same or

    do you want me to tell you my script
  • aarioaario Member, PRO Posts: 256
    that should still work ..make sure run to completion is not checked
  • aandiaandi Member Posts: 99
    can i tell you my script. because i have tried and no luck
  • aarioaario Member, PRO Posts: 256
    send me the file and i'll take a look for you.

    elliottapps@gmail.com
  • aandiaandi Member Posts: 99
    sent
  • aarioaario Member, PRO Posts: 256
    Hey I just sent you an e-mail. I hope I got it working the way you wanted it to!

    Goodluck :)

    Aaron
  • aandiaandi Member Posts: 99
    thank you so much.

    one question

    the ones you said is not necessary can i delete them or
  • aarioaario Member, PRO Posts: 256
    aandi said:
    thank you so much.

    one question

    the ones you said is not necessary can i delete them or

    your welcome :)

    and yes you can delete them I just figured I'd leave them there to help you out
  • aandiaandi Member Posts: 99
    oh thanks so much
Sign In or Register to comment.