How can I make a character shrink without walking (i.e., elevator, etc.)

  • #1, by firewarden-1Monday, 16. January 2017, 14:52 3 years ago
    I have a couple of circumstances where I need characters to diminish across a short distance without walking. The first one is where they stand on an elevator platform that sinks down one floor level down an open elevator shaft to the opening to a basement tunnel. 

    I've animated the elevator shaft in another program, showing it going down into the floor and stopping at the bottom. 

    I want to be able to see my characters shrink as they approach the bottom of the elevator shaft. Then I'll have them walk out the door. 

    What's the best way to have my characters do this? Do I need to set up duplicates of them as objects or something? Is there a script that lets them shrink without really moving/walking?

    Sorry if I'm missing something obvious. Any and all help is greatly appreciated!

    Newbie

    6 Posts


  • #2, by ke4Monday, 16. January 2017, 15:24 3 years ago
    Could you please provide some examples? I'm not sure if i understand the way you want to do this. Is it supposed to be a top/bird view?

    Anyway you could either set up an another outfit, where walking would be actually just a static image and then change it to this outfit and let it shrink by "walking".

    There's a line you can use to set the size of the character.

    game.CurrentCharacter.CharacterScaleFactor = 75
    1

    I suppose you could make some loop to change the size to a size you want it.

    wait for 40ms
    game.CurrentCharacter.CharacterScaleFactor = game.CurrentCharacter.CharacterScaleFactor - 1
    jump to action part #1
    1
    2
    3

    Key Killer

    810 Posts

  • #3, by firewarden-1Monday, 16. January 2017, 18:19 3 years ago
    Could you please provide some examples? I'm not sure if i understand the way you want to do this. Is it supposed to be a top/bird view?

    Anyway you could either set up an another outfit, where walking would be actually just a static image and then change it to this outfit and let it shrink by "walking".

    There's a line you can use to set the size of the character.

    game.CurrentCharacter.CharacterScaleFactor = 75
    1

    I suppose you could make some loop to change the size to a size you want it.

    wait for 40ms
    game.CurrentCharacter.CharacterScaleFactor = game.CurrentCharacter.CharacterScaleFactor - 1
    jump to action part #1
    1
    2
    3

    It's a top/birds-eye view of a floor where the middle of the floor is actually an elevator. The elevator disc sinks down from floor level to the basement level, where there is a door. I don't mind switching scenes as they exit the door.

    I want them full-sized at floor level and smaller at the bottom. It can actually just be them not walking, just static images. I just want them to appear to go down on the elevator.

    I'm not sure how to put that better. I need them to move slightly, not just stay in one place. I will do a mask of the floor to make it seem as if they are passing through it.

    Newbie

    6 Posts

  • #4, by sebastianMonday, 16. January 2017, 18:35 3 years ago
    then it should be enough to do as ke4 suggested with setting game.CurrentCharacter.CharacterScaleFactor higher/lower in a  loop until it reaches the wanted size smile 

    Thread Captain

    2336 Posts

  • #5, by afrlmeMonday, 16. January 2017, 18:36 3 years ago
    The only way to force scale of a character is inside of a loop because by default they will either be 100% or scaled automatically based on the way system scaling values you provide.

    You could swap out the character for a scene object that contains an animated idle version of your character & change the animation size of that, or you could force the scale inside of a loop, but you should be aware that using a character & not disabling scene interaction with begin/end cutscene or hide/show cursor action parts will allow the player to update the characters destination.

    game.CurrentCharacter:to(3000, {CharacterScaleFactor = 10}) -- adjust current characters scale factor to 10% size over 3000ms (3 seconds)
    1


    I've not tried forcing to() tweening function on character scaling before. The last time someone asked for forced scaling was back before we had shorthand Lua scripting methods available, so I would have probably used a mainLoop event handler & some conditions/values to handle it.

    Imperator

    6816 Posts

  • #6, by firewarden-1Monday, 16. January 2017, 18:50 3 years ago
    The only way to force scale of a character is inside of a loop because by default they will either be 100% or scaled automatically based on the way system scaling values you provide.

    You could swap out the character for a scene object that contains an animated idle version of your character & change the animation size of that, or you could force the scale inside of a loop, but you should be aware that using a character & not disabling scene interaction with begin/end cutscene or hide/show cursor action parts will allow the player to update the characters destination.

    game.CurrentCharacter:to(3000, {CharacterScaleFactor = 10}) -- adjust current characters scale factor to 10% size over 3000ms (3 seconds)
    1


    I've not tried forcing to() tweening function on character scaling before. The last time someone asked for forced scaling was back before we had shorthand Lua scripting methods available, so I would have probably used a mainLoop event handler & some conditions/values to handle it.
    Okay, that gives me enough info to choose if it's better to do it that way or do the whole thing as a cutscene. I've had problems with character movement enabled when they're supposed to be static during a cutscene. I'm just learning, so some of this is bugs and some of it's probably me missing something.

    Thank you for your help! smile

    Newbie

    6 Posts

Write post