Hi All! I Need Some Help On "Metronome"

EminemEminem Member Posts: 667
edited November -1 in Working with GS (Mac)
Hi!

I am running through some problems , i am unsure how to make a adjustable metronome app, meaning i want it to swing and to be adjustable.

Sorta like this:

image

Thanks in advance

Comments

  • PhoticsPhotics Member Posts: 4,172
    To get that cool pendulum effect, I'd probably use interpolation. I'd adjust the time of the interpolation to control the speed. Then, it's basically a toggle between two interpolations. When one interpolation is completed, trigger the next interpolation. When the angle is 90° play the tick sound.

    I haven't tested it though. That's just how I imagine it would work.

    It seems pretty easy. Maybe I should add a metronome to the Photics: Toolbox.
  • EminemEminem Member Posts: 667
    I cant get it to work , is there anyway you can make a demo? Or something
  • EminemEminem Member Posts: 667
    Bump, does anyone know how to make a metronome in Gamesalad!? :D

    Thanks in advance
  • EminemEminem Member Posts: 667
    Some one help Im freaking out!!! :D lol
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    The moving arm needs to be a separate actor that is twice as high as it is wide. The pivot point of the arm should be in the dead center. You may want to actually make it so that it is wide and not tall so that at zero degress it is pointing to the right (horizontal)

    Create an attribute called game.SwingSpeed (real) and
    self.SwingLeft (boolean)

    Then set the arm actor's rotation (in the attribute panel to the left of where you drop rules) to whatever the far right angle is going to be (let's say 315).

    Rule when self.rotation = 315
    change self.SwingLeft to 1

    Rule when self.Rotation = 235
    change self.SwingLeft to 0

    Then create a rule that says when self.SwingLeft is true
    interpolate self.rotation to 235
    time game.SwingSpeed
    OTHERWISE
    interpolate self.rotation to 315
    time game.SwingSpeed
  • EminemEminem Member Posts: 667
    this is very weird, i did exactly as you told me but when i press play, it does not show up, not even the image , its invisible ,

    Do you think a metronome is even possible in gamesalad???

    thanks for replying ;D
  • EminemEminem Member Posts: 667
    Bump*

    I'm still struggling on this
  • JackBQuickJackBQuick Member Posts: 524
    scitunes said:
    Rule when self.rotation = 315
    change self.SwingLeft to 1

    Rule when self.Rotation = 235
    change self.SwingLeft to 0

    Since SwingLeft is a boolean. Try changing it to this:

    Rule when self.rotation = 315
    change self.SwingLeft to true

    Rule when self.Rotation = 235
    change self.SwingLeft to false

    Not sure if this makes a difference but it's worth giving it a try.
  • ValanValan Member, BASIC Posts: 410
    Very doable in GS and a nice project. The challenge may be to get the correct timings.

    I think for the swinging graphic it would best to do a horizontal stick that is only visible from the centre to the right side. Like the long arm of a clock that points to a quarter past the hour.

    GS would use the centre of the graphic(clock hand) as the pivot point when it rotates.

    Here is the movement for a quick test.
    image

    Note: The rectangle is horizontal but has a rotation set to 90 with a Angular Velocity of 10.

    Cheers
  • ValanValan Member, BASIC Posts: 410
  • ValanValan Member, BASIC Posts: 410
    Mods,
    Please help me fix the broken links.

    Cheers
  • EminemEminem Member Posts: 667
    hey guys!! thanks for the quick responses right now im at work on a pc computer , when i get home i will check it out! thx guys! will let you guys know
  • vegasmike1vegasmike1 Member Posts: 192
    @E you said the image did not show up, so this is probably just not what you mean but sometimes I set a HUD layer and when I put things there they dont show up, if that is the case you need to put the image in a different layer, just a thought.

    O)
  • EminemEminem Member Posts: 667
    Hi vegasmike1,

    actually im not even using HUD, it just moves and dissapears, for some reason this happens when i put on the interpolate part,

    Valan is this my computer messed up or gamesalad? i cant seem to download or view the gamesalad project????

    its only your project , did you uplaod it wrong???

    wierd...... :(

    Thanks everyone for your help!!! appreciate it very much!!

    :D guess i have to play around with it more , to get it to work
  • EminemEminem Member Posts: 667
    Hey everyone!

    It's been 2 hours and I can't get this too work, I'm not sure what I'm doing wrong, also I forgot to add I'm makin a iPad app, can this be the issue?
  • ValanValan Member, BASIC Posts: 410
    Somehow I screwed up and can't upload the demo.

    I'm trying to get a youtube vid up but it's taking ages.

    Brief explanation of demo.

    Create an actor(name it Metronome Arm)

    Drag it onto the stage and stretch it so it is a horizontal rectangle.

    Click into the Actor Metronome Arm
    Create Rule.

    When
    Attribute Metronome Arm Self.Rotation = 60
    Interpolate Metronome Arm self.Rotation to 120

    Copy the rule(option + drag & drop)

    When
    Attribute Metronome Arm self.Rotation = 120
    Interpolate Metronome Arm self.Rotation to 60

    In the Actors attributes panel change the initial Rotation to 60

    What this does.
    Metronome Arm is already rotated to 60 when the app starts so the Metronome arm rotates to 120 and back again.

    sorry about the demo

    hope this helps
  • ValanValan Member, BASIC Posts: 410
    Youtube demo up now.

    Crap. sound delayed by a couple of seconds.



    Cheers
  • EminemEminem Member Posts: 667
    Yes!!! thank you so much! it works

    Valan you are a hero, Many Thanks!!!!
  • ValanValan Member, BASIC Posts: 410
    You're welcome.
    Look forward to seeing the finished project.
Sign In or Register to comment.