how to running my character with double click button ?

  • #1, by wimfSaturday, 03. February 2018, 18:20 6 years ago
    Hi

    I search a soluce to run my character when I double click in a scene

    On mouse properties, Double click action ,I run this script :

    Change character speed of 'Ben' to 20
    
    Change character animation index of 'Ben' to 3
    
    Wait until character 'Ben' stops
    
    Change character speed of 'Ben' to 6



    I specify that the animation index '3' is the animation of my character "running", and that the index works, but when I put it in the double click, it does not activate it

    But if I create an action on an object (eg 'look window'), and that in the action I put "Change character animation index of 'Ben' to 3", my character runs.

    The problem is only with the action "double click."

    How to change the index of my animation with double click before the animation 'walk' and can play the animation "run" instead of "walk"

    Thank you

    Forum Fan

    238 Posts


  • #2, by sebastianSunday, 04. February 2018, 18:39 6 years ago
    Hey there,

    you are right. The global double click action doesnt get triggered in my test as well.
    Maybe @SimonS needs to have a look at this...


    Nevertheless i would accomplish a "running" function otherwise:

    1st outfit: normal walk speed in the outfit settings + walk animation
    2nd outfit: faster walk speed in the outfit settings + running animation

    mouse properties: LEFT CLICK: first action part before anything else: set characters outfit to "1st outfit".

    mouse properties: DOUBLE CLICK: first action part before anything else: set characters outfit to "2nd outfit".

    By that you can "spam" your (double) clicks anywhere and the character will automatically sets its speed depending on the outfit. Also it will reset to normal walk speed at every "normal" left click.

    ~Sebastian

    Thread Captain

    2346 Posts

  • #3, by wimfSunday, 04. February 2018, 18:51 6 years ago
    Hello Sebastien,

    Thank you for your hint; It is a good idea. I will try this.

    If simon could look at this bug, it would be cool smile it will make less resources for the game smile

    Joël

    Forum Fan

    238 Posts

  • #4, by sebastianTuesday, 06. February 2018, 08:35 6 years ago
    can you nake a screenshot of yout game settings page, please? 

    Thread Captain

    2346 Posts

  • #5, by wimfTuesday, 06. February 2018, 09:37 6 years ago
    Yes of course, thank you.

    Forum Fan

    238 Posts

  • #6, by sebastianTuesday, 06. February 2018, 11:37 6 years ago
    could you check if changing the " disable interaction during character animation" option in the game settings work for you? 

    Thread Captain

    2346 Posts

  • #7, by wimfTuesday, 06. February 2018, 12:52 6 years ago
    Yes, but my problem is same roll

    Forum Fan

    238 Posts

  • #8, by sebastianTuesday, 06. February 2018, 13:27 6 years ago
    not sure whats causing it then... Maybe some lua script with mouse event handler interferring with the usual actions or a general misconfiguration... 

    Thread Captain

    2346 Posts

  • #9, by wimfTuesday, 06. February 2018, 13:52 6 years ago
    I think I understood the problem.

    When I double click very fast several times, I see the animations change a fraction of a second.

    If in the double click, I only change character speed to 20, it works

    but if I add "Change character animation index to" 2 ", it works only 1 fraction of a second only when I click very fast several times (really fast).

    So the double click function works

    What I think :

    - When double clicking, VS automatically saves the info that the character must go to where I clicked, since the engine sends a character automatically to the place where the player clicks and triggers the animation WALK
    - Then only after the script launches. VS accelerates the movement with "change character speed" but the "change character animation" does not work because the animation "walk" is already playing ...

    What do you think of my theory and is there a solution?

    WORK : 
    
    Change character speed of 'Ben' to 20
    Wait until character 'Ben' stops
    Change character speed of 'Ben' to 6
    
    NOT WORK :
    
    Change character speed of 'Ben' to 20
    Change character animation index of 'Ben' to 3
    Wait until character 'Ben' stops
    Change character speed of 'Ben' to 6
    Change character animation index of 'Ben' to 0
    

    Forum Fan

    238 Posts

  • #10, by wimfThursday, 08. February 2018, 20:34 6 years ago
    I have tested more.

    If my character play 2 walk animation to reach his destination  (eg : walk up, and after, walk right, the walk up have a old index (0) and walk right have a new index (eg : 3 for run).

    my theory posted the Tuesday, 06. February, 13:52 h  seems correct.

    Have you a idea for help me ?

    Thank you smile

    Forum Fan

    238 Posts

  • #11, by sebastianThursday, 08. February 2018, 22:44 6 years ago
    i wrote a few sentences on the discord server. Even reduced to only use double click seems to be buggy.


    double click gets only triggered if excessively clickrd very fast. Nothing comparable to a normal double click you may use to open an application. 

    I never used double click, so i cant compare to the behavioir before. Also not sure if there is a workaround using Lua mouse handler (guess this will  end up with the same results). 

    Currently i see no way to use double click without side effects...

    Thread Captain

    2346 Posts