GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

swinging continuous motion

shylevarishylevari Posts: 16Member
edited December 2014 in Working with GS (PC)

I have randomly spawned actors (para-troopers) falling down from the top of the screen with the Accelerate behavior.

I want to make them "swing" from side to side:

  1. How to pivot from the top of the parachute? so far it seems creating an asset with top half transparent is the easiest solution.

  2. I'm using the "rotate to angle" to rotate once to the left, then again to the right.. but it will not continue. Is there a way to create a "while" loop?

  3. Using "rotate to angle" will rotate without a nice animated ease. I tried to figure out how to incorporate the "interpolate" behavior, but I need the "relative to actor" thingy because all the while the actor is "falling down"

Best Answers

Answers

  • shylevarishylevari Posts: 16Member

    since the soldiers are supposed to be spawned at different x positions, the two top formulas arent helpful (they are all spawned at the same position. using the random makes everything .. weird..)

    but the rotation formula works great and is infact what i wanted :)

    thanks alot!!

  • SocksSocks London, UK.Posts: 12,822Member
    edited December 2014

    @shylevari said:
    since the soldiers are supposed to be spawned at different x positions, the two top formulas aren't helpful

    There are not multiple formulas here, this is all one formula, you need to use these three constrain behaviours in conjunction with each other.

    @shylevari said:
    (they are all spawned at the same position)

    You can spawn the actor wherever you like. Like I say "The '512' and '384' values are just the location of the swinging object, change these values to whatever you need" all the spawned actors don't have to be in the same position.

  • shylevarishylevari Posts: 16Member

    I used only the constrain rotation line, with a seperate (accelerate) behavior and i like the result :)

    I dont understand how i can spawn a new actor in a different location each time using this code

  • SocksSocks London, UK.Posts: 12,822Member

    @shylevari said:
    I dont understand how i can spawn a new actor in a different location each time using this code

    Simply change the '512' and '384' location values to whatever you need.

    Example:

    http://www.mediafire.com/view/3ndkgwnk84s050m/parachute_swing.zip

  • shylevarishylevari Posts: 16Member

    @Socks‌ tnx for the file
    the result is desireable - but the math is beyond my comprehension :)
    i wanted to add an ever increasing variable to make the paratroopers fall faster over time

    i couldn't figure where to place it. i assume it's on the constrain y position rule, related to self.time.
    near the first one it made the paratroopers wobble faster (but not fall faster), and near the second one it made the paratroopers spawn lower on the screen - but not fall faster

    again - tnx for the file, but the math is beyond me :)
    i prefer to stay with what i know and understand (and hope pivoting will be an added feature for game salad in the future!)

Sign In or Register to comment.