Position changing every second

Meestar

  • Posts: 654
Um no.  I need to fix that.  It's not 100% perfect yet, but definitely a good base.  Still working on it!
PM me if you require help.  I'm always glad to help out!

orYan

  • Posts: 47
No, check my behavior under the Boolean code block.  When it sets collide to true it waits about .2 seconds then turns on lock position which stops left/right movement in the always code.  When collide becomes true it cacels the timer causing the blocks to fall, which stops downward movement.

I have the new one uploaded.

i tried adding to the updated events a if lock position is true set x and y to self..but it didnt work..but ill check out your new upload :D thank you!

Just keep in mind the new one is a bit complicated.

heres a picture...i actually was able to get a block to stay in the air the last second before it locked (in the picture) band i think to solve that i would and another collision check before the lock position becomes true?

orYan

  • Posts: 47
Um no.  I need to fix that.  It's not 100% perfect yet, but definitely a good base.  Still working on it!

oh haha alright...

Meestar

  • Posts: 654
All right, fixed it up a bit.  Floating blocks are less-likely to happen AND it shouldn't be possible to push blocks any more.
PM me if you require help.  I'm always glad to help out!

orYan

  • Posts: 47
All right, fixed it up a bit.  Floating blocks are less-likely to happen AND it shouldn't be possible to push blocks any more.

sweet! ill check it out later today, ive starting using some of the behaviours and its working pertty well (the moving issue wasn't that noticeable since in my game there aren't rows and rows of blocks and sometimes moving left and right beside a block wouldn't move it unless there was a tower of blocks)
...but why was it doing that? im just curious why it would do that sometimes and not other times
...and in the code, after in the boolean is set to true for lock position...the y co-ordinates is set to itself - 2? what is the -2 for?

it just hit me also...if i were to export this for lets say the ipad retina..would all the position values be scaled up by 4x automatically...instead of moving 16 pixels, it moves 64? or do i have code this game differently for each resolution


« Last Edit: February 04, 2013, 08:20:22 am by orYan »

Meestar

  • Posts: 654
All right, fixed it up a bit.  Floating blocks are less-likely to happen AND it shouldn't be possible to push blocks any more.

sweet! ill check it out later today...why was it doing that? im just curious why it would do that sometimes and not other times...and in the code after in the boolean is set to true for lock position...the y co-ordinates is set to itself - 2? what is the -2 for?

it just hit me also...if i were to export this for lets say the ipad retina..would all the position values be scaled up by 4x automatically...instead of moving 16 pixels, it mores 64?

The y of self - 2 has been removed because I myself had no idea why it was there.  As for the sometimes being able to push blocks, it was because my position checking code wasn't 100% looking at the right spot, but now it should be,  As for iOs I have no idea, I've not yet developed for it yet, but the only time it wouldn't be +/- 16 is if you imported an actor larger than 32x32.
PM me if you require help.  I'm always glad to help out!

orYan

  • Posts: 47
All right, fixed it up a bit.  Floating blocks are less-likely to happen AND it shouldn't be possible to push blocks any more.

sweet! ill check it out later today...why was it doing that? im just curious why it would do that sometimes and not other times...and in the code after in the boolean is set to true for lock position...the y co-ordinates is set to itself - 2? what is the -2 for?

it just hit me also...if i were to export this for lets say the ipad retina..would all the position values be scaled up by 4x automatically...instead of moving 16 pixels, it mores 64?

The y of self - 2 has been removed because I myself had no idea why it was there.  As for the sometimes being able to push blocks, it was because my position checking code wasn't 100% looking at the right spot, but now it should be,  As for iOs I have no idea, I've not yet developed for it yet, but the only time it wouldn't be +/- 16 is if you imported an actor larger than 32x32.

ohh okay, im excited to see what changed ahaha...i plan to hopefully get this on all ios screens, so for the retina display id use larger actors

what do you usually develop for? has it made picking up stencyl easier?

Meestar

  • Posts: 654
Well, I develop for PC.  I do flash games because I picked up Stencyl, but before that I was making Java games.

If  the actors are scaled up, it's of whatever their half-width/height is.  Find everywhere you see a 16 and replace it with larger size.
PM me if you require help.  I'm always glad to help out!

orYan

  • Posts: 47
Well, I develop for PC.  I do flash games because I picked up Stencyl, but before that I was making Java games.

If  the actors are scaled up, it's of whatever their half-width/height is.  Find everywhere you see a 16 and replace it with larger size.


Hmmm I see, I wish I had a little more background before jumping in but I already started lol

So if I want ti develop for higher resolutions I have to code for each one? Like the size of the actors and the values for the area the blocks stay in?

orYan

  • Posts: 47
Well, I develop for PC.  I do flash games because I picked up Stencyl, but before that I was making Java games.

If  the actors are scaled up, it's of whatever their half-width/height is.  Find everywhere you see a 16 and replace it with larger size.

hey so i tried the new version and i got these errors when i tried to test it

ehavior: Design_2_2_BlockMovement at line 208
Syntax error: A string literal must be terminated before the line break.
 LEFT MOVEMENT" */

Behavior: Design_2_2_BlockMovement at line 208
Syntax error: expected a definition keyword (such as function) after attribute LEFT, not MOVEMENT.
 LEFT MOVEMENT" */

Behavior: Design_2_2_BlockMovement at line 234
Syntax error: A string literal must be terminated before the line break.
        /* "Moves this block right if it doesn't detect another block to the right of this one" */

Behavior: Design_2_2_BlockMovement at line 282
Syntax error: A string literal must be terminated before the line break.
            /* "Stop a block's movement when it hits something else" */

Behavior: Design_2_2_BlockMovement at line 488
Syntax error: A string literal must be terminated before the line break.
            /* "Stop a block's movement when it hits something else" */

Behavior: Design_2_2_BlockMovement at line 488
Syntax error: expecting rightbrace before else.
            /* "Stop a block's movement when it hits something else" */

Behavior: Design_2_2_BlockMovement at line 620
Syntax error: expecting rightbrace before end of program.


Behavior: Design_2_2_BlockMovement at line 620
Syntax error: expecting rightbrace before end of program.


Behavior: Design_2_2_BlockMovement at line 620
Syntax error: expecting rightbrace before end of program.


Behavior: Design_2_2_BlockMovement at line 620
Syntax error: expecting rightbrace before end of program.


Behavior: Design_2_2_BlockMovement at line 620
Syntax error: expecting rightbrace before end of program.


Behavior: Design_2_2_BlockMovement at line 620
Syntax error: expecting rightbrace before end of program.


when it opens the block movement behavior it doesn't highlight any specific errors :S

Meestar

  • Posts: 654
Looks like it has a problem with the comments?  I'll check and reupload.
PM me if you require help.  I'm always glad to help out!

orYan

  • Posts: 47
Looks like it has a problem with the comments?  I'll check and reupload.

i have no idea lol...it just wouldn't start ad these errors came up, but sweet thanks! ill wait until its fixed

Meestar

  • Posts: 654
Yeah, didn't like the comments so I removed them from the code blocks and reuploaded.
PM me if you require help.  I'm always glad to help out!

orYan

  • Posts: 47
Yeah, didn't like the comments so I removed them from the code blocks and reuploaded.

haha alright thats awesome..ill redownload

as so are these actors being created called lightweight actors?  Im a little confused because it says in the stencylpedia they cannot be collided

Meestar

  • Posts: 654
Yeah, didn't like the comments so I removed them from the code blocks and reuploaded.

haha alright thats awesome..ill redownload

as so are these actors being created called lightweight actors?  Im a little confused because it says in the stencylpedia they cannot be collided

In this example, no, because I have code for when collisions happen.  Its possible to do for this game, but not being done.  Check out Mee - Snow or Mee - Rain for lightweight example.
PM me if you require help.  I'm always glad to help out!