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.
Develop games in your browser. Powerful, performant & highly capable.
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.
At what point does it crash? TextureHandles are reference counted, which is taken care of for you when creating a new textureHandle. But when manually setting a texture to an existing textureHandle it appears that you need to manually increment the reference.
http://www.google.com/codesearch#ri7jKR5oU44/Runtime/RenderLayer.cpp&q=AddTextureReference%20package:construct&type=cs&l=79
You can't do it in construct without removing the family but this should be able to do it:
http://dl.dropbox.com/u/5426011/examples7/rename%20family.zip
Put your cap in the same folder as this and change 'fileToOpen' to the name of your cap.
Member since 15 Jun, 2009