A better solution would to use an instance variable to store the id of your objects. The uid is only only constant at runtime. In the editor if you change the z ordering the uid can be different at runtime.
Put the sprite12 events as a subevent of a "for each sprite12" then the arrows will act independent of each other. Or did you want it to do something else?
Search for "worms" there is an example that uses the canvas plugin to do destructible terrain.
Another idea would be to set the bottom layer as transparent "use webgl" off, and "clear background" as no. That way anything that is drawn stays there until it's overdrawn. Then you could draw the terrain, and only redraw the parts where stuff is moving/changing. You can store the entire terrain in an array and juggle a small amount of blocks to do the drawing. So at any given time you'd have only say 100 objects being drawn per frame but you would see 1000s on screen.
InvaderX
Look at the example again, you need to make events 47-50 sub-events of 46.
Also the order of the actions is important. It should be like this:
Dictionary: clear
..
Dictionary: add key...
StorageGame: set value at index to Dictionary.AsJSON
System: add 1 to index
I've done this before and it works pretty well.
As soon as you jump start ignoring input and set deceleration to 0.
Then when the player lands stop ignoring input and set deceleration to what it was before.
Develop games in your browser. Powerful, performant & highly capable.
Check the example on that other topic.
I'd say he meant difficult. You have to explicitly specify all the info you want to save.
Here is one idea:
http://dl.dropbox.com/u/5426011/examples13/save_load.capx
I use the dictionary object to store the named values for each object. I then insert dictionary.AsJSON into the array for each object. The array now is a snapshot of what I want to save. It is then trivial to save to webstorage with the action:
webstorage: set local key "game_save" to Array.AsJSON
I'd say tokenat() is the bottleneck here.
I replicated your example but used a 610k text file of the english dictionary (60387 words). It was dog slow. I stopped it after 10 seconds and it only had read 1400 words.
So I modified it and used mid() and find() to progressively get the words.
http://dl.dropbox.com/u/5426011/examples13/dict.capx
It read the entire thing in 0.979 seconds.
Then for the fastest possible performance I modified the example above to save the Array to a JSON file. Then I made another capx to load it with the load from JSON action.
http://dl.dropbox.com/u/5426011/examples13/dict_json.capx
The data file is now 905k but loads in 0.039 seconds.
The platform behavior prevents any overlap with "Solid" objects. When the "on collision" event is run the objects are not overlapping so the actions are never run.
The feature already exists, but it is not available for the free version.
http://www.scirra.com/store/construct-2
At least I think that's what "Project Folders" means. Try right clicking in the objects bar and see if a "add subfolder" option is there.
Glad it was useful. You can reduce you event count to 2 by putting all the objects you want to wrap into a family.
I'm curious about the changes to the formulas, namely this:
LayoutWidth-LayoutWidth
Couldn't you just use 0 since it will evaluate to 0 no matter the value of LayoutWidth.
Perhaps the warp behavior does something similar to what you tried with events.
Do it with these two events instead:
X > LayoutWidth+self.Width/2
set X to self.X-LayoutWidth-self.Width
X < -self.Width/2
set X to self.X+LayoutWidth+self.Width
Member since 15 Jun, 2009