Problem with my shooter code
Blitz3D Forums/Blitz3D Programming/Problem with my shooter code
| ||
Can someone please tell me which line and why it's complaining that entity does not exist? I looked for it... the stupid debugger won't highlight the line that has the problem.... |
| ||
The debugger on my version of Blitz3D highlights this line:Text GraphicsWidth()/2, GraphicsHeight()/2, "X: "+EntityX#(camera.tcamera\currentx#, True), 1, 1 Which is line 181. camera.tcamera\currentx# is not an entity. I do believe you want camera.tcamera\camera instead. Or maybe you wanted to just use the camera.tcamera\currentx# field without the call to EntityX? |
| ||
Thanks alot, bro! :) |
| ||
Ok, 1 more small problem... Why does the text keep constantly writing more text to the screen? o.o |
| ||
A slight change to UpdateText will clarify this.Function UpdateText() Local c For camera.tcamera = Each tcamera If camera.tcamera\camera<>0 Text GraphicsWidth()/2, c + GraphicsHeight()/2, "X: "+camera.tcamera\currentx#, 1, 1 Text GraphicsWidth()/2, c + GraphicsHeight()/2+20, "Y: "+camera.tcamera\currenty#, 1, 1 Text GraphicsWidth()/2, c + GraphicsHeight()/2+40, "Z: "+camera.tcamera\currentz#, 1, 1 c = c + 100 EndIf Next End Function |
| ||
Thanks for that! :) |