Throwing or Flicking an Actor - DEMO

firemaplegamesfiremaplegames Member Posts: 3,211
edited November -1 in Working with GS (Mac)
Hey All,

I just added a throwing/flicking demo...

http://gamesalad.com/game/play/30692

Throwing/Flicking an Actor - first attempt

This demo show a way that can be used to "throw" or "flick" an actor. I turned gravity on just for fun.
This can be used as a way to throw a ball/projectile in a game. By turning gravity off, it is a way to create a bowling or shuffle puck game as well.

Feel free to use this in any way you see fit.

This is my first attempt at this. Sometimes it seems a little wonky to me. Feel free to add improvements and let me know.

Good luck!
Joe

Fire Maple Games

Comments

  • SparkyidrSparkyidr Member Posts: 2,033
    wow...feels really great (only tested in the web viewer tho)
    niceone.
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    very nice. I was trying to figure out how to do this myself, this is a much better solution than what I was coming up with.

    I played around with it on my phone, and personally, I changed the amplification up to 8, and friction up to 60, it felt more natural to me, but that's just my taste.
  • firemaplegamesfiremaplegames Member Posts: 3,211
    thanks. yeah feel free to monkey with the numbers. it doesn't behave all the time, but its a start.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    I don't know how you mathy guys do it! I love this demo - I can't wait to try using it in some game ideas I have. I'll post my tweaks as I figure things out.
  • butterbeanbutterbean Member Posts: 4,315
    I've been looking into doing a flicking type demo, thanks a bunch!!
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    There is one thing I am trying to add to this. I plan to try a few things, but in case the answer is quick and obvious to someone here I will ask. Is there a way to have a point on the screen that forces the object to be released. So like in bowling there is a line at the start of the lane. I would like to make it so that even if your finger goes beyond the start of the lane the object is released at the point where the lane starts. Otherwise you could just drag the object to the target rather than "throwing" it at the target. Seems like there should be a way to say if object's position is greater than some ammount then "release." Just not sure yet how to make changes to firemaple's rules to get this to work.

    Thanks for all the help!
  • firemaplegamesfiremaplegames Member Posts: 3,211
    yes, that's exactly how you would do it. by checking an X or Y position.

    you could have a global boolean attribute called "hasCrossedLine", leave it set to FALSE.
    if the X or the Y position, whatever you're checking for, of the Actor crosses it, set hasCrossedLine to TRUE.

    In the rule where it throws the actor, the one with the change velocity, add a condition there that says:
    When hasCrossedLine is FALSE

    Then create a separate rule that says:

    When hasCrossedLine is TRUE
    Change Velocity ( use can copy and paste the same one)

    That should do it for you.
    Or something along those lines.
  • firemaplegamesfiremaplegames Member Posts: 3,211
    i just tweaked the demo a bit. changed some numbers here and there. didn't change any rules.
    seems a little better...
  • mythicappsmythicapps Member Posts: 82
    I realize this is an old thread, but I am running into a problem with the demo. Well not the demo but using it.
    When I copy the rules for the ball from the demo to my GS game, they copy fine, but once the actor is closed any attempt to open the actor again or preview the game results in a complete GS crash. I have manually added in the attributes before copying the rules, but I still get a complete GS crash, any suggestions as to why this might be and how to fix it?

    Thanks
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    its copying it thats doing it. youll have to recreate everything manually if you dont have the merger
  • jake360flipjake360flip Member Posts: 2
    This is very helpful thank you.
This discussion has been closed.