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
- Create a new quest with the default ruleset
- Compile the script below to test Link->PressL
- Save and test the quest in the ZC player
- 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!