GameSalad

Touch rotate how?

iraqiraqiraqiraq iraq baghdad , muslimPosts: 89Member
edited May 2 in Working with GS (PC)

hello every body i see new game in google play like spinner fidget
he click on spinner if the finger right the spinner go right if the finger left the spinner go left . if touched not much he move easy if touched very speed he go speed .the spinner stoped with touch power if you know what i mean
how i make like this ?

Comments

  • iraqiraqiraqiraq iraq baghdad , muslimPosts: 89Member

    no answer or just some helps steps ?

  • elementappdevelementappdev Posts: 55Member, PRO

    To answer the spin direction:
    You want two real attributes (Touch_Start) and (Touch_Stop). Then make an actor on the background (size of whole screen) and when touch--> is down :: change attribute Touch_Start) to mouse.postion.X.

    Then touch--> is released :: change attribute Touch_Stop) to mouse.postion.X.

    Then (on release) if start is greater than stop, rotate at (whatever speed you want) counterclockwise. If start is less than stop, rotate (again whatever speed you want) clockwise.

    In terms of a harder press--> faster spin and vice a versa, I don't believe GS can detect the pressure of a touch.

  • ArmellineArmelline Posts: 4,459Member, PRO

    Perhaps link to a video. I'm afraid I really didn't follow your description very well.

  • iraqiraqiraqiraq iraq baghdad , muslimPosts: 89Member
    edited May 2

    @elementappdev CAN YOU MAKE A DEMO PLEASE BECUZE SOME RULE I DONT KNOW HOW YOU MAKE IT!

  • iraqiraqiraqiraq iraq baghdad , muslimPosts: 89Member
  • tatiangtatiang Posts: 11,085Member, Sous Chef, PRO, Senior Sous-Chef

    You realize that ALL CAPS indicates YELLING online?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • iraqiraqiraqiraq iraq baghdad , muslimPosts: 89Member

    THIS NEW LAPTOP LOL

  • SocksSocks London, UK.Posts: 12,754Member
    edited May 2

    //

  • iraqiraqiraqiraq iraq baghdad , muslimPosts: 89Member
    edited May 2

    @socks not copy paste thing ! i just need how i know make like that in gs just to be a pro like you :) or another developer in gs

  • SocksSocks London, UK.Posts: 12,754Member
    edited May 2

    //

  • iraqiraqiraqiraq iraq baghdad , muslimPosts: 89Member

    if i make spinner how i make it ? becuze i dont have a pro account ! and how i upload to gs ? i dont have a pro account you know i cant make any thing like this just i need to be a pro of gs games not make copy paste games

  • iraqiraqiraqiraq iraq baghdad , muslimPosts: 89Member

    @elementappdev mean i make 3 rule ?.or just one rule and greater than in else ?

  • IceboxIcebox Posts: 1,446Member, PRO

    @iraqiraq Is this what you want ? i attached a demo

  • iraqiraqiraqiraq iraq baghdad , muslimPosts: 89Member

    @Icebox thnx my brother but i need know how i make it with mouse x ! becuze i need learn it .or how i make it without button just roll the spinner

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

    @Icebox said:
    @iraqiraq Is this what you want ? i attached a demo

    The centre of a triangle is 2/3rds of the way along each of the three medians, so if you have an equilateral triangle like a fidget spinner, and it is sat like an arrow pointered upwards (▴) the centrepoint will be 1/3 of the way up the image/actor, whereas leaving the centrepoint 1/2 of the way up (GameSalad's default) will give you that weird disjointed rotation !

  • iraqiraqiraqiraq iraq baghdad , muslimPosts: 89Member

    @Socks thnx for this advice you helped me 70%

  • IceboxIcebox Posts: 1,446Member, PRO

    Thanks for the info socks !

    @iraqiraq This is simple , you only need the fidget actor and this rule

    {if mouse button is down

    (create another rule inside)

    [if game.mouseposition.x > game.screen.size.width/2 ( if mouse is at the right side)
    rotate clockwise
    otherwise
    rotate counter-clockwise]

    otherwise
    }

    thats it

  • iraqiraqiraqiraq iraq baghdad , muslimPosts: 89Member

    thnx @Icebox but this if clicked /if your finger out side the spinner he stop moving .im not need stop . i need him stop slow to 0 :)

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

    "i need him stop slow to 0"

    Increase angular drag to slow down a rotating actor.

  • iraqiraqiraqiraq iraq baghdad , muslimPosts: 89Member

    @Socks VERY THNX TO HELP ME :)

  • RThurmanRThurman Posts: 2,761Member, Sous Chef, PRO

    This spinner demo might be useful:

Sign In or Register to comment.