浏览代码

Update controller.script (#234)

To fix `ERROR:GAMEOBJECT: Component '/level/ground/controller#controller' could not be found when dispatching message 'set_speed' sent from main:/level/controller#controller`
If we follow the tutorial we create a script and name it `ground.script`.
Daniel Tereshchenko 3 年之前
父节点
当前提交
c09173e1a4
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      docs/en/tutorials/runner.md

+ 1 - 1
docs/en/tutorials/runner.md

@@ -424,7 +424,7 @@ We should also add a controller game object with a script component to the level
     go.property("speed", 360) -- <1>
 
     function init(self)
-        msg.post("ground/controller#controller", "set_speed", { speed = self.speed })
+        msg.post("ground/controller#ground", "set_speed", { speed = self.speed })
     end
     ```
     1. This is a script property. We set it to a default value but any placed instance of the script can override this value, directly in the properties view in the editor.