button & point

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By wertrhp

how can i link button with score bar when i Press the button go 1 when i press it again go 2.3.4.5…

can anyone help me with the step by step

and what i need to write in scripts and the tools

and thank you :smiley:

I’m not sure if I understand your questions completely but lets do one after another. For your first question: I would think your score bar is a texture progress or a progress bar node. Well and your button is a common button. You need to have a script in your scene too, my recommendation would be the main node.

  1. Now select your button, went over to Signals tab.
  2. Doubleclick pressed() and then select the node that owns the script you want your function to be in.
  3. Click connect.
  4. You should see the script now and an empty function (should have a pass in it) called something like _on_button_pressed() where button is you buttons name.
  5. In there enter a line of code:
$ProgressBarNode.value += 1

use your nodes name or path to the node like $Node/Bar

that’s all for the first one
break
ok now this second thing. You mean the step by step tutorial Your first game? Well what do you want to know, what doesn’t work. Please be more specific.
break
what do you mean with tools? what do you need tools for?
break
you’re welcome

hope that helps. keep it up.

Jowan-Spooner | 2019-05-10 14:39