Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | unknown_one | |
Old Version | Published before Godot 3 was released. |
EDIT:
it appears is_action_just_pressed
comes from a development version, but the below chess game doesn’t load into the v3 alpha development version, it must have been made for some other development version… in any case, it doesn’t load into version 3 even after renaming editor.cfg to project.godot
I downloaded a chess project from here:
the godot project did not run because it used
if (Input.is_action_just_pressed("ui_select")):
to determine if you just clicked a place on the board, the game would then would highlight the possible places to move on the board by coloring the squares differently
unfortunately Input.is_action_just_pressed
appears to be removed from the engine, only Input.is_action_pressed
remains. Using the latter causes the highlighted squares to rapidly toggle and most of the time, the squares don’t remain highlighted after a mouse click.
So what do we use now when we need to do something only once when ui_select is triggered?
The “just_pressed/released” is on the 2.2-legacy (unreleased) version too, that project may be using that one.
eons | 2017-07-19 11:28