Delay with Input.trigger or am I just messing up?

Discussion in 'RPG Maker VX Ace' started by BalakaySenpai, Oct 17, 2014.

  1. BalakaySenpai

    BalakaySenpai Villager Member

    Messages:
    6
    Likes Received:
    0
    First Language:
    English
    So after spending some time, I couldn't find a way to make an overworld punching actions for my character. I came up with a common even that changes the characters sprite quickly to display a "punching" action which works with other events in game. The problem that I am running into is that the player needs to press a key for the action to be called through a common event. After mixing up Input.trigger with Input.press, I am experiencing fluxiating delay with the event.

    [​IMG]

    Basically, if you press CTRL, the character switches sprites to look like a punch, then switches back. However if you press the key again afterwards, nothing happens- it doesn't run it again. However after a few seconds or so, if I press CTRL, it will not only run it, but sometimes it will run multiple key pressess. However it will still not allow another input immediately afterwards. All I want to accomplish is that if the player pressess CTRL, it will run this action, and can be repeated with no problems. Also the two Input.updates are there due to me tinkering to try and fix this problem :/
     
    #1
  2. Galenmereth

    Galenmereth I thought what I'd do was Veteran

    Messages:
    2,206
    Likes Received:
    1,920
    Location:
    Norway
    First Language:
    English
    Primarily Uses:
    RMMV
    Put a Wait 1 frames on the very top there, before the condition; that ought to sort it out. Also not sure why you go "Input.update": there should be no need. What is calling this common event? Is it a parallell process?
     
    #2
  3. Engr. Adiktuzmiko

    Engr. Adiktuzmiko Chemical Engineer, Game Developer, Using BlinkBoy' Veteran

    Messages:
    14,640
    Likes Received:
    2,969
    Location:
    Philippines
    First Language:
    Tagalog
    How are you running that common event? It wasn't even set to autorun or parallel
     
    #3
  4. BalakaySenpai

    BalakaySenpai Villager Member

    Messages:
    6
    Likes Received:
    0
    First Language:
    English
    On my map, there is a parallel process event that calls the common event. I set it up like this to test different conditions, and to limit this action from always being able to happen.

    I put the one frame wait as you stated, however it did not resolve my issue. It may be more beneficial if I record this, or if someone could try and replicate it to see if they get the same result.

    EDIT*: The Input.update was placed there to see if that would initially fix the issue but it didn't. I removed it once I put the one frame wait, but still no luck.
     
    Last edited by a moderator: Oct 17, 2014
    #4
  5. Engr. Adiktuzmiko

    Engr. Adiktuzmiko Chemical Engineer, Game Developer, Using BlinkBoy' Veteran

    Messages:
    14,640
    Likes Received:
    2,969
    Location:
    Philippines
    First Language:
    Tagalog
    Then show us the event of the map too
     
    Last edited by a moderator: Oct 17, 2014
    #5
  6. BalakaySenpai

    BalakaySenpai Villager Member

    Messages:
    6
    Likes Received:
    0
    First Language:
    English
    Interesting. What do you mean by checking my FPS though? Do you mean my games or... ?

    The only reason why I think I am having issues could be that I have multiple Parallel processes with one other event that is on the map, however still I wouldn't think that it would affect the Input.trigger if it wasn't affecting something like the characters movement as an example. I could be wrong.

    EDIT*: Print screening map and stuff.
     
    Last edited by a moderator: Oct 17, 2014
    #6
  7. Engr. Adiktuzmiko

    Engr. Adiktuzmiko Chemical Engineer, Game Developer, Using BlinkBoy' Veteran

    Messages:
    14,640
    Likes Received:
    2,969
    Location:
    Philippines
    First Language:
    Tagalog
    Press F2 and you'll see the FPS of your game on the title... Also show us the image of the event on the map
     
    #7
  8. BalakaySenpai

    BalakaySenpai Villager Member

    Messages:
    6
    Likes Received:
    0
    First Language:
    English
    Thanks for the info about the games FPS display. Didn't know about that until now.

    In regards to that, when I preform the action, it doesn't dip. It stays between 45-60. Also attached to this reply are three images. One of the game with its FPS, my map event with calls my common events, and one NPC event that has multiple pages of Parallel processes.

    Enemy.png

    Game FPS.png

    Map Event.png
     
    #8
  9. Engr. Adiktuzmiko

    Engr. Adiktuzmiko Chemical Engineer, Game Developer, Using BlinkBoy' Veteran

    Messages:
    14,640
    Likes Received:
    2,969
    Location:
    Philippines
    First Language:
    Tagalog
    the difference from 60FPS might be causing it. 60 is the normal FPS.
     
    #9
  10. BalakaySenpai

    BalakaySenpai Villager Member

    Messages:
    6
    Likes Received:
    0
    First Language:
    English
    That definitely makes logical sense, however I would argue that if that were the case, then I would have delay issues if I were to replace Input.trigger with Input.press. When I switch to press, it works perfectly with no issues, however I do not want this action to be able to be repeated by holding down the key. I am trying to make it where you have to press the key for each time you want to do the action. Again, when I use press, it doesn't lag, stutter, or anything.. :c
     
    #10
  11. Engr. Adiktuzmiko

    Engr. Adiktuzmiko Chemical Engineer, Game Developer, Using BlinkBoy' Veteran

    Messages:
    14,640
    Likes Received:
    2,969
    Location:
    Philippines
    First Language:
    Tagalog
    It might be an internal delay for Input.trigger? then.. though I never really noticed something of that kind.


    You can still use input.press, run the CE and activate a switch that when ON, would disallow the common event to run.. then if the input isn't pressed, turn switch to false. That way even if he long presses the key, the event will run only once
     
    Last edited by a moderator: Oct 17, 2014
    #11
  12. BalakaySenpai

    BalakaySenpai Villager Member

    Messages:
    6
    Likes Received:
    0
    First Language:
    English
    That ended up working perfectly! I guess there just is an internal delay with Input.trigger which is really interesting. Again though, your solution definitely helped me accomplish what I have been having issues with all day, so thank you very much! :) Im going to attach screens to this reply to show what fixed it.

    Resolution 1.png

    Resolution 2.png

    Resolution 3.png
     
    #12
  13. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,071
    Location:
    Toronto
    First Language:
    English
    There is a delay for trigger.


    It's documented in the help file

    The reason why this exists is for example if you press the "a" key, do you want your word editor to enter 20 a's just because you happened to hold down the key for more than a few milliseconds?


    Or more relevant to RPG Maker, if you press the OK button, do you want to suddenly speed through every confirmation because it doesn't know whether you only wanted one key to register or not.
     
    Last edited by a moderator: Oct 17, 2014
    #13

Share This Page