I’m making a third person game and want my camera to follow my mouse, but not only that, i want my character to look and turn wherever my mouse goes. Example: Tera. So I want it to have the same logic as a first person, but in third person mode. Can any one help me with that?
Second question is multiple events. Let’s say I want to make an event where if i tap W twice my character does a dash. That’s simple. I did that. But what if I left click in addition to double tapping w? I want it to perform a different attack instead. But I can’t figure out how to say “if W has been pressed twice and left click has also been pressed, then do this”.
Here’s an update. I got it working better now. However, I want to add W, A, S, and D, not just W. So I tried adding the A and using the same logic from the W. It works but the problem is now when i press A and then W or vice versa in succession, it will register that as a “double tap” even though they are two different keys. So it should only dash when one key is double tapped. Not a mixture of any key. How can i fix this?
I’m not exactly an expert here - but from what I can see I must assume you’re using the same variable for your W and A logic. You’ll have to have a separate “# presses” variable for each key. Alternatively, reduce the delay on your set #presses to 0, although that would probably affect your gameplay.
That’s happening because you are determining the “double tap” event based off of a single variable (#Presses). Since “W” and “A” are using the same exact code, you will need to determine a way to distinguish which key has been pressed and set the #Presses for that key.
Yes, as the others said, i was using only one variable for “keypresses”. To solve this, you just use a keypresses variable for each individual key. i also seperated each key. so i have a W state, A state, S state and so on.