1. #1

    Multi-stage animation help? (Figured it out!)

    I am trying to get a car to move using object position events.
    I can get it to perform one operation, but what I need is for it to drive, stop, drive and turn.
    I can't seem to link each stage at all. I'm using local positioning because I feel it's easier.
    I've kind of bodged the drive and turn using X position and yaw, but I can't get it to wait and then continue. At the moment I have a car, a data source each for X position and yaw, and a state event to enable the data sources on hit. This works fine for stage one.
    So I thought I could just use that again for stage 2 but just delay the impulse to time with the end of the data sources and expected it to continue. I've tried to use delayed impulses, a separate impulse that starts when the other ends and various other things but it just won't move once it's stopped.

    Any help would be massively appreciated.
    Share this post

  2. #2

    Re: Multi-stage animation help?

    Nevermind I think I've figured it out. Probably made it way more complicated than it needs to be but at least it works.
    Just gave myself a crash course in 2 input operators, impulse delays and generic filters.
    Share this post

  3. #3
    jook13's Avatar Senior Member
    Join Date
    Mar 2014
    Posts
    3,157

    Re: Multi-stage animation help?

    Originally Posted by EuphoricFusion
    Nevermind I think I've figured it out. Probably made it way more complicated than it needs to be but at least it works.
    I know the feeling mate, this editor is very powerfull, but I sometimes feel there is a better, more effecient way of doing things than the way I figured to do it... you should see all the impulses and triggers and whatknot in my pinball table...
    Share this post

  4. #4

    Re: Multi-stage animation help?

    It looks such a mess but it's done the job nicely for stopping and starting.
    Now I guess I need to repeat for turning.
    Quite chuffed with myself for working it out on my own

    I might take some pics tomorrow and try and explain how I did it and then if anyone knows a better way let me know please!
    Share this post

  5. #5

    Re: Multi-stage animation help?

    I think I'm starting to get the hang of this now.
    Just ripped out something physics based and animated it instead and it looks so much nicer.
    Share this post

  6. #6

    Re: Multi-stage animation help?

    I'm in a similar situation with animating a train. It involves moving from a stationary position, 'cruising' for a couple seconds, and then crashing off a collapsed bridge. That last bit is gonna be fun ( I haven't gotten that far quite yet!)

    It's a learning progress, but here's a pic of how I've set up my Events:


    (excuse the terrible 'taken with my iPhone' quality)

    So, the logic is to move the object a set distance, right? I figure that out using the Distance Operator (bottom-right) hooked up to two dummy objects. I use this value as the End value for the Curve Data Source, just to the left of it. That curve data is then being fed into the Object Position Event (bottom-left), which is being fired with an Impulse Interval with an Interval Tick set to 1, which is pretty standard stuff for getting something to move with the Object Position Event if you messed with it by now.

    The Object Position Event is hooked up to three major parts that make up my train (not pictures), which is why there's 3 blue dotted lines coming from it.

    The only real hard number I input myself is the Variable Data Source, seen in the top-right. It's use is for setting up the duration of the Curve Data Source, the max number of impulses the Impulse Interval sends, and most importantly, off screen, the length of the delay for an Impulse Delay Filter, which is being immediately fired off by the Object Position Event.

    So further down the line, next to the mentioned Impulse Delay Filter, is another similar setup of events to determine the next movement of the train. It's pretty much the exact same setup, with the addition of a State Event to turn everything on, which is fired by the Impulse Delay Filter. This 2nd setup will not start firing until the 1st setup has 'finished'.

    As mentioned before, this editor does seem super powerful... it's keeps surprising me at the staggering amount of options and flexibility, yet remaining arguably simple to achieve (sorta!). There is almost certainly a way of simplifying your first method on doing something... for example, I could have perhaps used a combination of Input Operators feeding a Variable Data Source and move the train with that, rather than relying on Curved Data Sources. I could even cap the Variable Data Source so it doesn't go too high, preventing the train going too fast.

    Then I coulda just used an area trigger for the train to collide with, to initiate the 'crash' movements.

    Hmm... maybe I should make this again?

    But anyway, good work finding it out yourself! This game's full of little eureka moments And while you're first method might not be the most reliable, who cares so long as it works?
    Share this post

  7. #7

    Re: Multi-stage animation help?



    Here is my setup for the animation. Took me an age to figure it out but it works perfectly.

    From the top down.
    Area trigger (off screen) enables the State Event which turns on the first interval trigger (set at 1 tick) and the first curved data source .
    Impulses go to the splitter which goes to the object position event (positions set as local) and to the Equals Filter.
    First curved data source goes from 0 to -31 and is attached to the N-Input operator (Add) which in turn attaches to Position X in the object position event.
    This is the first stage of the animation complete.
    The filter sends an impulse when the value reaches -31, which goes to impulse delay.
    When the delay is over the impulse goes to the State Event to enable the second curved data source (another -31) which is also attached to the N-Input operator, effectively adding another -31 of movement on the x-axis to the previous.

    So in effect all I am doing it moving the car, holding it, then adding more distance.

    In writing this it all seems so simple and clear! Now I just have to add in another string to make it start to turn at a set distance using the same filter technique.

    Make sense? Surprisingly it does to me now.
    Share this post

  8. #8

    Re: Multi-stage animation help? (Figured it out!)

    I was able to understand what you did/wrote, so it makes sense to me.

    Turning though... that doesn't sound easy haha.
    Share this post