system
1
|
|
|
|
Attention |
Topic was automatically imported from the old Question2Answer platform. |
|
Asked By |
Kharagh |
|
Old Version |
Published before Godot 3 was released. |
This example from your Docs»Step by step»Scripting (continued)
doesn’t work:
A simple way to test this is to create a scene with a single Label node, with the following script:
extends Label
var accum=0
func _process(delta):
accum += delta
text = str(accum) # text is a built-in label property
enter link description here
What do you mean by “doesn’t work”? What happens?
Edit: your screenshot didn’t show, I had a look
Zylann | 2018-01-16 13:45
system
4
|
|
|
|
Reply From: |
Kharagh |
Follow the link at the question. This is a screenshot.
system
5
|
|
|
|
Reply From: |
Zylann |
The tutorial you followed is for Godot 3.0. You are using 2.1.4.
system
6
|
|
|
|
Reply From: |
volzhs |
You are seeing 3.0 example, but using 2.x.
that’s for 3.0
if you want to do it, set_text(str(accum))
instead of text = str(accum)
I think the Docs is updated to latest because it’s about to release 3.0
if you want 2.x documents, see this.
just change stable
to 2.1
on URL.
Godot Docs – 4.1 branch — Godot Engine (stable) documentation in Englishstable → 2.1/learning/step_by_step/