Jump to content

Photo

[NEW][ZScript][2.50.x] InputAxisUp, InputAxisLeft always return true.


  • Please log in to reply
2 replies to this topic

#1 Orithan

Orithan

    Studying Scientist - Commission from Silvixen

  • Members
  • Gender:Male
  • Location:Australia

Posted 24 January 2019 - 04:17 AM

When testing a function designed to get the total sum of Link's inputs, I ran into a strange bug.

 

Link->InputAxisUp and Link->InputAxisLeft always return true unless set to false earlier in the frame. This happens regardless of when I trace it; before Waitdraw in the global script, in an FFC script, after Waitdraw in the global script, etc. I've also tested it in different qst files for the same result.

Despite those inputs being set they don't do anything - Link doesn't move in either of those directions. This is probably also another bug in ZC related to this bug.

 

//The following will always print true unless set to false earlier in the frame
TraceB(Link->InputAxisUp);
TraceB(Link->InputAxisLeft);
 
//They will return false under the following scenario
Link->InputAxisUp = false;
Link->InputAxisLeft = false;
TraceB(Link->InputAxisUp);
TraceB(Link->InputAxisLeft);

 

ZC version: 2.50.2


Edited by Orithan, 24 January 2019 - 04:22 AM.


#2 ZoriaRPG

ZoriaRPG

    The Timelord

  • ZC Developers
  • Gender:Unspecified
  • Location:Prydon Academy

Posted 25 January 2019 - 06:26 AM

When testing a function designed to get the total sum of Link's inputs, I ran into a strange bug.
 
Link->InputAxisUp and Link->InputAxisLeft always return true unless set to false earlier in the frame. This happens regardless of when I trace it; before Waitdraw in the global script, in an FFC script, after Waitdraw in the global script, etc. I've also tested it in different qst files for the same result.
Despite those inputs being set they don't do anything - Link doesn't move in either of those directions. This is probably also another bug in ZC related to this bug.
 
 

//The following will always print true unless set to false earlier in the frame
TraceB(Link->InputAxisUp);
TraceB(Link->InputAxisLeft);
 
//They will return false under the following scenario
Link->InputAxisUp = false;
Link->InputAxisLeft = false;
TraceB(Link->InputAxisUp);
TraceB(Link->InputAxisLeft);
 
ZC version: 2.50.2

 


(1) Please check if this is still a problem, in 2.53. I suspect that it was fixed by a change in input handling in the past.

(2) If it remains, then it could be because the variable is returning a boolean (digital) value for what should be an analogue value (to be useful), and while the analogue sensitivity threshold may block very low analogue directional values (e.g. un-centred joystick) from having an in-game effect, they are still technically non-zero, and anything non-zero would return true.



#3 Orithan

Orithan

    Studying Scientist - Commission from Silvixen

  • Members
  • Gender:Male
  • Location:Australia

Posted 25 January 2019 - 04:08 PM

It is fixed in 2.53. I tested it there.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users