Posts by Jarred

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.

    Sorry, had to step out yesterday.

    That's great! Good examples :) I know they'll be useful.

    What I was trying to say yesterday about modifying the width was in the original equation of the ellipse, there's an input specific for the width. Possibly resulting in a tighter curve.

    I thought it was the Y distance that determined whether the target was hit XD I think you both understand the math better than I do.

    Schrodinger - I'm working with yours at the moment since I'm failing to grasp the math of the ellipse.

    Race you? ;) I'm attaching an active to the mouse pointer which alters the angle of the bar based on angle to target (so the ball hits the active) and altering the mid point based on frame height and distance to the active. Those two together should be pretty close to what I think I'm going for. I'm not positive it'll hit the active but it feels like it should.

    Mobichan - you tackling the ellipse boomerang? That would probably be cleaner than the rotation translation.

    More info for you math majors:

    Please login to see this link.

    Please login to see this link.

    So close...you'll love this

    [[((X cos(a) - Y sin(a))pow2)/(swing_width)pow2)]+[((X sin(a) - Y cos(a))pow2)/((Start_y-Target_y)/2)pow2)]]=1
    a = -3.14, 3.14 (pi to pi)

    I think 'a' is a radian. Pi to Pi is full circle. Just need to figure out 'a' for the angle to target.

    ...wow I'm dumb. 2pi is 360 degrees :O Thanks!

    For part 2, there may be a work around. Can the ellipse be rotated by the angle to the target? I've done this with a Sine wave...might have been one of yours? Like pretend the frame is just graph paper and we rotated it 45-degrees? To us it would appear to move in an oval at an angle but the program wouldn't care and the math wouldn't need to change.

    This isn't a hard question but I can't seem to lay out how to use 't' in my head. What I'm trying to do is create a uniform flight path (oval, not a circle) where after reaching the target (mid point of flight) the projectile continues along its orbit back to point of origin.

    I think there's 2 ways to do this, either calculating the parabola to the mid point and then inverting it for the return, or calculating the parabolic ellipse. At this point I'm trying to do the ellipse.

    Here's a site with some good background math: Please login to see this link.

    The equation of a parabolic ellipse is:

    x = a Cos t
    y = b Sin t

    a = radius from mid point to extreme point of curve along x-axis
    b = distince from mid point to origin along the y-axis
    t = a number ranging from 0 to 2pi radians

    The a and b are easy enough to figure out; a is the width I want the projectile to swing, and b is equal to ((origin_y - destination_y)/2). 'T' just pisses me off ;) I'm afraid to ask how much harder this will be if the origin and destination are on an angle other than 90-degrees too X)

    I can do the equation for a parabola no problem but the ellipse is killing me. I'm not even using gravity here! Help?

    Well, the concept is the same and should be adaptable. Are you trying to account for like being hit by an arrow (projectile), being held on to by an enemy, or picking up a weapon?

    I think it's fairly easy until you want to move between frames. You would need to capture the attach points and save them for future use. Actually, you'll have to capture the points of contact anyway so you can always have the object affixed to the player. I *think* an issue you might be grappling with is how to attach single instances of like objects to the player. When the object collides or overlaps the player:

    1) capture the fixed ID of the object that is colliding. I don't think this step is absolutely necessary but it might come in handy so you can specifically deal with the individual objects when needed.
    2) capture the coordinates of impact relative to the player, store with the object
    3) turn on a flag on the object
    2) in a separate event, based on the flag, change the animation or color of the object to reflect what you want it to look like. This will take care of every like object in the future.
    3) Now the fun part, I think you need a for each loop on each object...someone can correct me. For each object that has a flag active, 'attach' to the player at the stored points at the current angle. The attach code is what keeps keeps it in place and referenced as the player angle changes.

    I would start there. I don't know if I'm good enough to program this out myself in short order (I have my own issues to deal with) but I think the above is what you want. Start simple, like just see if you can get the object to collide and change its animation. Than try to affix it to the player.

    Getting right to it, I'd like to attach a rope to an object that gets thrown. As the object moves away from the origin, the rope should lengthen and as it returns, should shorten. I guess the closest example would be like a yo-yo if also thrown in an arc. I'm avoiding using something like a beam to stretch out since it'll be like a pole instead of something flexible.

    I'm sure I'm overthinking it. I bet the current rope in CTF can do this easily but I'm worried about it breaking.

    Gamester - Thanks, that's great! You actually solved another issue for me :) Quick question about returning to the perch....how did you do it? I was thinking of programming in an inverse swoop when the bird reaches the half way point (and I did). The issue I have is on the return it's like a quick jump and not at all smooth. It looks like yours will eventually return after going full circle in a large circumference too.