Closed Pattentrick closed 10 years ago
So skipping the released check fixes it and still works for clicks or keys?
Oops, i meant skipping the release action fixes this.
javascript
else if ( ig.input.released( this.action ) ) {
this.nextStep();
}
Like that it fixes that issue with clicks and keys. Not sure about touch devices though, but i could test that too later in the afternoon if you like.
That's okay, touch and mouse are both handled as a tap action, so it should be fine. I'll add this fix shortly, thanks for finding it :-)
You are welcome @collinhover ;-)
Hi @collinhover,
i noticed that pressing a key will skip a conversation step, when i am using the conversation entity, if auto advance is deactivated. If i am on step 1 and press my defined action key to advance the conversation i will end up with step 3.
I think the problem is this part of the code:
https://github.com/collinhover/impactplusplus/blob/dev/lib/plusplus/entities/conversation.js#L1064
Example:
I am on step 1 and i am pressing the action key down, so the else if statement above gets executed and the conversation advances to next step, but after that short moment i will release that action key, and the statement gets executed again so it skips to step 3 (if present) and you just see a very brief flickering step 2.
Could we fix that by removing one of the conditions in that else if statement like this:
javascript
// wait for action else if ( ig.input.pressed(this.action) ) {}