The image is fine, it displays correctly when you run the project. The reason it doesn't display correctly in the editor is a graphics card limitation.
Develop games in your browser. Powerful, performant & highly capable.
The Global() expression only takes a valid global name, it can only take a string from python. A solution would be to use a global hashtable object.
There's no switch statement in python, and "Create" works with a the text name of the object.
This works:
from random import randint,random def edgeplacement(o,l): # get the name of the object objectName= o.__class__.__name__ if randint(0,1) == 1: x = randint(0,1) * 640 y = random() * 480 else: x = random() * 640 y = randint(0,1) * 480 System.Create(objectName,l,x,y) getattr(SOL, objectName).angle = random()*360
You need Python 2.6 or 2.7. I don't think you need the source code, the standard python install has the include files needed.
You can actually, but it's a bit low level using the windows api.
There's a python example for a menu bar here:
http://www.scirra.com/forum/menu-bar-via-python_topic42842_post266732.html?KW=menu#266732
It's admittedly a bit noisy in the bit for defining the menu, but it should be straightforward.
It can be solved by first moving horizontally then vertically, and reversing the horizontal or vertical motion when it overlaps a wall.
http://dl.dropbox.com/u/5426011/c2/bounce.capx
Hi,
Python runtimes are built by uncommenting
//#define PYTHON
in StdAfx.h and building like normal. Then just rename the built runtimes to have "s" in there filename.
There was a bug with GenerateCollisionMaskFromTexture() locking a texture region and not unlocking it. Is now in the SVN revision 283.
cool
It's simply an inconsistency, as it is if I need a higher precision value I have to use an action to set the value of the local or global variable.
The issue came up in this topic:
http://www.scirra.com/forum/maths-split_topic45088.html
For local and global variables, when inputting an initial number value, any number with more digits than 6 gets rounded, but at runtime 15 digit numbers can be used with no rounding.
With regard to the number size issue. If you set a variable with an action you can use 15 digit numbers with no rounding.
Member since 15 Jun, 2009