我看了其他論壇,並沒有找到我的問題的答案,我知道對於bge腳本只有當連接到邏輯磚時才工作,並且只是爲了確保我打字這是正確的方式,我在YouTube上觀看了一個bge教程,它對他有用,但對我來說不是。攪拌機遊戲引擎 - bge模塊沒有找到
如何下載bge模塊? 任何建議,將不勝感激
還我注意到後,我觀看了視頻攪拌機控制檯這樣說:
錯誤:
Python script error - object 'Cube', controller 'Python':
Traceback (most recent call last):
File "moveX.py", line 1, in <module>
ImportError: No module named 'Bge'
Blender Game Engine Finished
腳本:
import bge
def main():
cont = bge.logic.getCurrentController()
owner = cont.owner
owner.positive.x += 0.1
main()
和這就是爲什麼我不明白爲什麼它不工作。我在腳本上總是有一個傳感器,用真正的脈衝來移動我在x軸上的0.1個攪拌器單元,並且因爲只要我有bge運行,它就是一個始終傳感器,我在控制檯中獲取此消息:Python腳本錯誤 - 對象'Cube',控制器'Python': Traceback(最近調用最後一個): 文件「moveX.py」,第10行,在 文件「moveX.py」,第8行,主 AttributeError:'KX_GameObject 'object has no attribute'positive' Blender Game Engine Finished –
littleman27
與我上面發佈的相同 – littleman27
我想我知道問題是什麼問題是我正在觀看教程的人有可能擁有python的onlder版本,並且語法已更改從現在起,你可以幫助我,我會在上面的文章中發佈腳本 – littleman27