Super noob trying Gold Rush -- warm up -- as ogre


#1

In Python.

I have done a little googling for working code with no luck.

The example code that auto-loads doesn’t do anything and the first comment (’// this code runs once per frame…’) has an ‘x’ next to it, with the ‘unexpected token’ flag at the bottom. I can delete everything and write self.moveXY(1,1); and it works, but shouldn’t the example parse correctly and move the ogre to the 0th item, unless it doesn’t exist in which case the ogre goes to 18,36?

when I mouse over the ‘var items =…’ line the popup says items:undefined -

what am I doing wrong?


#2

Unfortunately, the sample code for most levels is still javascript, even though you have the option of switching to python. // is the comment symbol in javascript, # is the symbol in python. I don’t remember the initial code, but it might need some minor variation in order to make it work for python (change all “this.” to “self.”) Possibly other minor changes as well.

Good luck!


#3

We should now have the Python default code in there, although you might need to hit “Restart” at the top in the level to get back to the default code.