I’m using an online tutorial to make a game, but a script in it is written for blender 2.4. Can anyone help me convert it, or tell me how to do it myself? Thanks!
and gameObject properties are now accessed through the usual dictionary method (object[“property”], but I think get/setattr still work (?).
Besides that, just read the errors when you run the game.
It’s a bit difficult to read the code, if you hit “Go advanced” when posting you have a load more options and the button with a “#” will insert the code tags for you that will keep indentation. Or type the tags <code> and </code> around your script but with square brackets instead of angles.
I can’t test this since I don’t have your files, but the direct conversion would be something like the script below (it probably needs debugging). There is probably a more efficient way of doing it.
It’s strange to see how much has changed in such a short time, but the changes are mainly in syntax. The underlying data structures are pretty much the same. Hope this helps.