way systems - way too complicated

  • #1, z matthias-kleinWednesday, 14. December 2022, 16:17 hodinky A year ago
    Hi there,

    I have this problem with way points in scenes with backgrounds that are at different distances (see screenshot). Between the fence and the door, the player appears way too small.

    The character size is defined at the 3 blue marked way points (1 - 3).

    How can I make the player ignore the character size from point 1 while walking between point 2 and 3? Is there even a way to solve this without LUA?

    I tried to solve the problem with two different way systems that swap as soon as the player enters a defined action area near the fence. But this solution doesn't work for me, because the player always stops when entering the action area.

    Thanks for your help.

    Matthias

    Bažant

    12 Posts


  • #2, z afrlmeWednesday, 14. December 2022, 22:47 hodinky A year ago
    Ideally it's best to scale outside of the way system borders on the y-axis only, but that's not always possible. In regards to changing the way system, it's possible, but you need to store the all the relevant destination data into variables before changing the way system then immediately update them afterwards to have the character resume walking. The reason it stops walking is because the engine doesn't know if the character will still be able to walk to the destination in the new way system as that would require it recalculating if it's possible & what the best/direct route is.

    Before changing the way system...

    Store destination:
    execute a script >
    t_dest =
    
    {
    
        dest = game.CurrentCharacter.Destination,
    
        obj = game.CurrentCharacter.DestinationObject,
    
        cmd = game.DestinationCommand,
    
        evt = game.DestinationEvent,
    
        itm = game.DestinationItem,
    
        itm_picked = game.DestinationItemPicked
    
    }


    After changing the way system...

    Restore destination:
    execute a script >
    game.CurrentCharacter.Destination = t_dest["dest"]
    
    game.CurrentCharacter.DestinationObject = t_dest["obj"]
    
    game.DestinationCommand = t_dest["cmd"]
    
    game.DestinationEvent = t_dest["evt"]
    
    game.DestinationItem = t_dest["itm"]
    
    game.DestinationItemPicked = t_dest["itm_picked"]


    Hopefully that will be of some help. smile

    P.S: the problem isn't that the way system is too complicated, the problem is using complicated perspectives that require scaling on both the x & y axis.

    Imperátor

    7285 Posts

  • #3, z matthias-kleinThursday, 15. December 2022, 07:14 hodinky A year ago
    This worked, thank you so much!
    Hopefully that will be of some help.
    Actually, it was of much help.
    This problem has been bothering me for years.

    Bažant

    12 Posts

  • #4, z afrlmeThursday, 15. December 2022, 21:33 hodinky A year ago
    Well then, you're welcome. wink

    Imperátor

    7285 Posts