Scale character enable/disable or lock at will in a scene?

  • #10, by afrlmeFriday, 21. November 2014, 20:55 10 years ago
    There is another approach I can think of, but it's also not an easy solution.

    It involves on character reach destination, make playable character invisible but move along the intended tube path. You would need to create a scene object which contains an animation of the character that you want to use while it is moving along the pipe & on character invisible we enable the scene object containing the animation & then we activate a lua loop which updates the animation position to the character position...

    Here's where things get tricky though as character position is based on where you set the character animation center for each character animation whereas normal animation positions are based on the top left pixel of the animation, which means you would need to calculate the offset required to position the animation correctly.

    All in all: this is not something I can write off the top of my head as it involves maths & other stuff. & as you can probably gather from my reply, it's not the most simple approach.

    You could just create it as an animation? It would require quite a few frames to make it look smooth but that would probably be the simplest approach in your case with 3.7.1.

    Imperator

    7278 Posts


  • #11, by OcttoManSaturday, 22. November 2014, 11:58 10 years ago
    Your idea sounds good, but do not quite understand, Make that a character (invisible) se mueva a traves del pipe y que un objeto que contenga la animación siga al personaje invisible with lua? But how controlled the scaling problem? the animation would follow being a size 1:1

    I think that i will scale the images/frames of the cloned character (the one with the animation) with external program (there are 5 scenes with this system with different sizes).

    Now, i have this, http://youtu.be/4KDCN0klrMo, with a "scale disabled" cloned character.

    I want use the move action, because a frame by frame animation dont give this smoothness in the movement.


    I will post the outcome


    Newbie

    16 Posts

  • #12, by afrlmeSaturday, 22. November 2014, 12:28 10 years ago
    I meant an animation inside of a scene object. They are fixed in size but you can easily adjust the scale of them with lua.

    My suggestion/theory was simple enough...

    1. Once your playable character reaches the destination, you use the set character opacity action part to make the playable character invisible but still on the scene.

    2. Immediately after that action you show the object animation version of the character.

    3. You enable a loop which forces the object animation to the current position of the playable character + or - x,y offset value.

    4. Then you make the playable character move around the pipe. The loop should automatically keep the object animation positioned in same place the current character is.

    Personally I think you should just animate it.

    I would offer to take a look at your .ved but I no longer have 3.7.1 installed & if I were to open your .ved in 4.1 then it would no longer be valid in 3.7.1, so you wouldn't be able to see any changes I made anyway.

    I do think animating it would be the easiest solution.

    Imperator

    7278 Posts

  • #13, by OcttoManSaturday, 22. November 2014, 12:31 10 years ago
    Yeah!crycry
    http://youtu.be/BKI0jn9f-ZU

    Now i will scale other 4 times making 4 more clones with different sizes for the other scenes, but it was the easiest way.

    Thanks for all AFRLme!

    I'll be back with more troubles!

    Newbie

    16 Posts

  • #14, by afrlmeSaturday, 22. November 2014, 13:00 10 years ago
    Was that with an animation alone? If it was then it looked ok to me. Smoothness is all down to amount of frames & setting the correct time between each animation frame.

    Imperator

    7278 Posts

  • #15, by OcttoManSunday, 23. November 2014, 18:31 10 years ago
    Was that with an animation alone? If it was then it looked ok to me. Smoothness is all down to amount of frames & setting the correct time between each animation frame.


    This is with a second escaled character to the same size of the player´s size in this point (87:100 scale) and scaling function disabled, it have the sucked up animation, but the move action is with "character send to..", so, i've got the fluid translate movement without having to do it frame by frame.

    Newbie

    16 Posts

  • #16, by afrlmeSunday, 23. November 2014, 19:59 10 years ago
    Ah not so bad then. I guess there's almost always a solution to pretty much every obstacle! wink

    Imperator

    7278 Posts