Skip to content

Mouse Click Question plus Two features request [startDrag & stopDrag node] #372

Answered by manuq
BracerJack asked this question in Q&A
Discussion options

You must be logged in to vote

For mouse click, you can add a new action in Project Settings. Then:

This is valid for the GDScript in your image too. Here Block Coding can teach you to use actions if you press "Show Generated Script":

extends SimpleEnding


func _process(delta):
	if (Input.is_action_just_pressed('click!')):
		game_over('WIN')

UPDATE:

For dragging, you can use the new mouse position block along with the action above. It could also be nice to explore having high-level blocks for this. In a SimpleDragDrop custom node, for instance.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by manuq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #363 on January 30, 2025 13:11.