Jump to content

Photo

[2.55 a85] Link->PressL doesn't trigger when walking left-up


  • Please log in to reply
2 replies to this topic

#1 Twilight Knight

Twilight Knight

    Tell all with glee, Argon's on PureZC

  • Members
  • Real Name:Sven
  • Location:Rotterdam, NL

Posted 16 January 2021 - 01:15 PM

Dear devs,
 
Summary
I have a script that reads Link->PressL to make Link jump. All works fine, except for when Link walks in the left-up direction (DIR_LEFTUP). For some reason Link->PressL will never be true if you walk in that direction.
 
Version info
2.55 alpha 85
 
OS info
Windows 10
 
Details
I have a script that reads Link->PressL to make Link jump. All works fine, except for when Link walks in the left-up direction (DIR_LEFTUP). For some reason Link->PressL will never be true if you walk in that direction.

 

I tested it with this script:

bool justPressedL = false;

void TestPressL()
{
	if(Link->PressL) {
		Trace(456);
		Trace(Link->Dir);
		justPressedL = true;
	}
	else if(justPressedL) {
		Trace(123);
		justPressedL = false;
	}
}

Call the TestPressL() function in your global active script.

 
How to reproduce

  1. Create a new quest with the default ruleset
  2. Compile the script below to test Link->PressL
  3. Save and test the quest in the ZC player
  4. Walk in every direction and you'll see in the zconsole that Link->PressL will never be triggered when you walk up-left
import "std.zh"
import "string.zh"

global script Active {
    void run(){
		while(true){
			TestPressL();
			
			Waitframe();
         }
    }
}

bool justPressedL = false;

void TestPressL()
{
	if(Link->PressL) {
		Trace(456);
		Trace(Link->Dir);
		justPressedL = true;
	}
	else if(justPressedL) {
		Trace(123);
		justPressedL = false;
	}
}
 

Thanks in advance!



#2 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 16 January 2021 - 03:45 PM

What are your keybinds? Sometimes keyboards have issues with pressing a number of close-together keys. There should be no relation between walking direction and input variables.


  • Twilight Knight likes this

#3 Twilight Knight

Twilight Knight

    Tell all with glee, Argon's on PureZC

  • Members
  • Real Name:Sven
  • Location:Rotterdam, NL

Posted 17 January 2021 - 09:14 AM

I use the default keybinds

 

uqOzvvn.png

(see Avaro's theme shine  :slycool:)

 

But you are right! This seems to be an issue with my logitech keyboard (it's a cheap one). Didn't imagine a keyboard would have such weird behaviour, because it is specifically with up, left & Z. Not with up, left & A for example

 

I tested it on my laptop and it works fine there, so indeed it's my keyboard. I'm reading that I should get a new keyboard, since it's just faulty hardware. Shame, because I like this keyboard otherwise.

 

 

You may consider this "bug" as solved. Thank you for the help!


  • Avaro likes this


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users