How can I have stars go out in a circle wherever I touch the screen for a menu effect?

jckmcgrawjckmcgraw Member Posts: 647
edited April 2012 in Working with GS (Mac)
Hello,

For my menu screen, I want a nice effect whenever you touch the screen. I want stars to start alpha 0 and go to alpha 1 as the circle grows. I think there is a simple math equation for particles or something, but I can't quite get it.

Thanks!
Jack McGraw

Best Answers

  • gyroscopegyroscope I am here.Posts: 6,598
    edited April 2012 Accepted Answer

    @jckmcgraw Hi Jack

    To get the stars to go out in a circle, put random(1,360) in the Direction (in Velocity/Position) of the Particles Behavior.

    As for fading in (or out), that can't be done in Particles, I'm afraid, mainly because the image you choose is taken from the main Library and not from a prototype.

    Hope that goes some way to help.

    ----------------------------------------------
    http://davidgriffinapps.co.uk/

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • JohnPapiomitisJohnPapiomitis Posts: 6,256
    edited April 2012 Accepted Answer
    In the color part of the particle behavior, select color changes to. In the first part hit the color tab and under the colors set the opacity to 0. Then hit the color tab for the target color and set the opacity to 100. That will fade it in.
  • pinata14pinata14 Posts: 150
    Accepted Answer
    @jckmcgraw
    have an actor with the particle rule and another
    when-mouse button is down
    then-change att (selfx/y) to game.devices.touches.touch1.x/y
  • gyroscopegyroscope I am here.Posts: 6,598
    Accepted Answer

    Hi @jckmcgraw Jack, try the following:

    Make a boolean, let's call it ParticleGo

    In the actor's rules:

    Rule: When ParticleGo is true
    Particles behaviour

    Rule: When touch is pressed
    Change attribute ParticleGo to true
    Timer After --- length you want the particles to run for --- run to completion checked
    Change attribute ParticleGo to false

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • Accepted Answer
    like this?
  • gyroscopegyroscope I am here.Posts: 6,598
    Accepted Answer
    As far as I can tell, Jack, @morphinegamingmachine is using particles on touch pressed only; on release, they stop: when touch is pressed > Particles behaviour. Drag rules used as well if you need it can be found as templates; plenty of them about!

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Answers

  • ZoytZoyt Member Posts: 374
    Here's an idea - Move the gravity around your finger at a fast speed and tell the particles to fall to gravity. They would keep falling in kind of a circle, simulating them flying around your finger. Tell me how it goes.
    Thanks!
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    In the color part of the particle behavior, select color changes to. In the first part hit the color tab and under the colors set the opacity to 0. Then hit the color tab for the target color and set the opacity to 100. That will fade it in.
    D'oh! :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • jckmcgrawjckmcgraw Member Posts: 647
    @gyroscope
    @johnpapiomitis

    That will work great for the stars. Now how do I get an actor with particles to go to the touch every time?

    @zoyt

    Interesting idea... I don't think that's what I'm going for though.

    Thanks for everyone's help!
    Jack McGraw
  • jckmcgrawjckmcgraw Member Posts: 647
    @morphinegamingmachine

    That's perfect! Did you make it like @gyroscope mentioned?
  • jckmcgrawjckmcgraw Member Posts: 647
    @gyroscope @morphinegamingmachine @JohnPapiomitis @zoyt @pinata14

    Thank you so much for all of your help! Putting all the advise I have been given together, I have found something that looks pretty good.

    Jack McGraw
  • ZoytZoyt Member Posts: 374
    No problem. I thought you meant to make it like the neutrons circling the atom continuously. Glad I could (kind of, not really) help!
  • jckmcgrawjckmcgraw Member Posts: 647
    @zoyt

    Ohh, that's what you meant! How would you make gravity fall around a position. I don't think that's possible....

    Jack McGraw
  • ZoytZoyt Member Posts: 374
    @jckmcgraw - I notices you can't change the gravity when I was trying to create it :-(
Sign In or Register to comment.