Game mechanic problem

lkmadlkmad Member Posts: 117
edited June 2014 in Working with GS (Mac)

Hi all, hoping someone here will help put me out of my misery as I've been trying to figure the mechanic for what I need to do for days.

I have this mini puzzle within my point and click puzzle/adventure game.

Basically what I need to do is you swipe at this hotspot area (an actor w/ appropriate size I presume) and then that actor registers the angle and swipe length (to control strength of a throw) shoots out either particles or spawns another actor. The tricky part and the bane of my existence is I need to also control where the spawned actor will go. For example, I need you to be able to throw the spawned actor aiming for a certain place and then when you hit it, it will register table value that you completed that mini game and you proceed with the game.

I've looked on youtube in the Cookbook for how to throw objects and how to figure out if you're swiping left/right but I can't control the angle and register it so that maybe I control this way that you're throwing in right direction, control how far you go or even figure out how to check for the final X/Y coordinates (preferably than the angle solution) of the thrown object to know that you hit the target.

Hope I'm making sense and someone can help me with this brain stinger!

Many thanks!

Edit:
Could I use:

Angle: VectorToAngle(ReleasePointX-TouchPointX,ReleasePointY-TouchPointY)
Strength: Magnitude(ReleasePointX-TouchPointX,ReleasePointY-TouchPointY)

from http://forums.gamesalad.com/discussion/46429/tracking-finger-to-throw-objects

But how do I check the final position of the actor? Also how do I spawn an actor and set these values from the hotspot area.

Comments

  • colandercolander Member Posts: 1,610

    That's a big question and takes a lot of time to answer. The best way to get help is to post a test project at the point where you are stuck with a detailed explanation of the problem and what you are trying to achieve.

    There are plenty of wizards around here who are very willing to help you over the hurdles as they crop up if you make it easy for them to do so.

  • lkmadlkmad Member Posts: 117

    Nevermind! Had an epiphany as I was going to bed last night to just have an actor to collide with at the desired area. That way I'll know it hit the spot and destroy itself, I'll fake the rest with particles.

    Thanks!

Sign In or Register to comment.