you could use a global variable and a loop. something like:
every tick
--- set global 'anykeydown' to 0
for "" from 0 to 255
key loopindex is down?
--- set global 'anykeydown' to 1
global 'anykeydown' equal to 0
--- do stuff
Hi,
I know this doesn't answer your question directly but I've found it's tricky to get that working good with collisions.
One idea i've tried before that works well is to instead just keep track of how far each block should move.
https://dl.dropboxusercontent.com/u/542 ... _drop.capx
If you want to create them every tick, you'll probably wan to destroy them all every tick first. You can also change the loops to go from -2 to 2 instead.
No problem. It was fun to make.
You can create objects in a formation by using two loops
start of layout for "x" from 0 to 3 for "y" from 0 to 3 --- create sprite at (loopindex("x")*32, loopindex("y")*32) [/code:egxi6tbt] You can control where the topleft of the formation is by adding it in so say you wanted the top left to be (100,150) you could use (loopindex("x")*32+100, loopindex("y")*32+150). you can also make the formation get created around a center. [code:egxi6tbt] global number rows=4 global number cols=4 global number centerx=100 global number centery=150 start of layout for "x" from 0 to cols-1 for "y" from 0 to rows-1 --- create sprite at ((loopindex("x")-(cols-1)/2)*32, (loopindex("y")-(rows-1)/2)*32) [/code:egxi6tbt] As a final example you can store the row, column in the sprite itself and do this: [code:egxi6tbt] global number rows=4 global number columns=4 global number centerx=100 global number centery=150 global number offsetx=0 global number offsety=0 start of layout --- sprite: destroy --- set offsetx to (columns-1)/2 --- set offsety to (rows-1)/2 start of layout for "x" from 0 to columns-1 for "y" from 0 to rows-1 --- create sprite at (0,0) --- sprite: set column to loopindex("x") --- sprite: set row to loopindex("y") every tick --- sprite: set x to centerx-offsetx+self.column*32 --- sprite: set y to centery-offsety+self.row*32 [/code:egxi6tbt] That way you can move it around by changing the center.
To add the newt's reply, there's the "load" action to load a json. Also there's the Tilemap.TilesJSON to get the json.
The closest you can get with behaviors is probably this:
Otherwise you'll have to get creative, maybe even do the motion with just events so you can make the rules about what is or isn't solid. But it's probably not simple.
add a variable to the enemy and call it direction and set it to 1.
Enemy: x < player.x-100
--- enemy: set dir to 1
Enemy: x > player.x+100
--- enemy: set dir to -1
enemy: dir = 1
--- simulate right pressed
else
--- simulate left pressed
Here's one way that works good.
Develop games in your browser. Powerful, performant & highly capable.
Probably should try updating your graphics card drivers if you can.
Itenimum1
It probably should say magnitude instead of distance. When using a polar force it's just how strong the force is. It does not equate to the number of pixels moved.
I don't think anything can be done about it currently. An extreme solution would be to have only on layout and impliment your own loading. Then you could make it load over multiple frames instead in one frame. Still I think the main thing that affects the loading time is loading the graphics of that layout into VRAM.
keepee
It's a bug. I never implemented pasting multiple effect objects correctly. Basically the plugin needs to be updated to draw exactly like c2's runtime does, but I haven't gotten to it yet.
If it's not working in the browser then it's not using webgl. Your card is blacklisted or something.
Yeah, I forgot to test it.
I meant to use:
(loopindex+1)/(startsprite.chainAmount + 1)
The idea was to only have links between and not on the ends.
You can make it just like yours if you do:
loopindex/startsprite.chainAmount