Like this:
minutes= int(seconds / 60)
seconds= seconds % 60
Set Text to minutes & ":" & seconds
The issue you're having is with how newly created objects are picked.
Here is an outline of the rules:http://www.scirra.com/forum/picking-problem_topic41776_post257714.html#257714
Develop games in your browser. Powerful, performant & highly capable.
Your diagnosis is correct it's not working since you are using the version of pygame built for python 2.7 and construct uses 2.6.
Download the version of pygame built for python 2.6 and that should solve it.
http://www.pygame.org/download.shtml
Performance will be better when using a plugin or behavior as opposed to events. It's usually negligibly faster but can make a big difference when doing complex stuff such as pathfinding.
You can't access global/local/instance variables with a text string. An array would be a solution in this case since a number is the only difference. You could also use the hash table plugin then you could set and get a value associated by a string. So the var is accessed with hashtable.At("namep1"&number&"namep2").
"OR" is a new feature that was added in R86.
You can get the latest beta version (R87)
Here:http://www.scirra.com/construct2/releases/r87
gokhansancar
In response to your PM here is an example with some concepts that will help.
http://dl.dropbox.com/u/5426011/examples10/doodlegodLikeMenu.capx
The item grouping was easy, each item has a variable that indicates what group it belongs to. I used variables targetX and targetY to indicate where the object should move to gradually. The rest was a bit of math to position the objects in a visually pleasing manner.
Here's another approach to clipping a line to a box:
http://dl.dropbox.com/u/5426011/examples10/lineClip.capx
Also an alternative solution would be to use math to find the intersections between the line and the sides of the box.
Bitmap graphics will almost always be faster than vector, because vector graphics are converted to a bitmap every time it's drawn.
Have a look here:
http://www.scirra.com/forum/checking-collision-between-2-objs-of-same-family_topic51401_post324216.html#324216
The concept is the same if not using families.
Family variables are inherited, if all the objects were changed to "onFire" then all of them were picked when "onFire" was set to True.
Here is an example:
http://dl.dropbox.com/u/5426011/examples10/fire.capx
Here is a way:
http://dl.dropbox.com/u/5426011/examples10/test2.capx
The red was dominating the blue so I made it pick randomly one of the two colliding objects to destroy.
Member since 15 Jun, 2009