Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - orYan

Pages: 1 2 3 4
1
Ask a Question / Re: Position changing every second
« on: February 06, 2013, 10:29:46 pm »
also ive made a post about this but my stencyl program is messed up or something...i cannot see any changes to a code unless i restart the whole program...even if i save before i test game...so its really hard for me to experiment and find out how to do things through trial and error (which is how i usually like to learn these kinds of things) when i have to restart everytime, im pretty sure anyone else would have given up by now but youve helped a lot...i plan to install stencyl on another computer soon so hopefully it just something with my old laptop and installing windows 8 :S

2
Ask a Question / Re: Position changing every second
« on: February 06, 2013, 10:24:33 pm »
Okay, added the new code in.  You can now move left/right after hitting down OR when collision detection occurs.  Also commented the collision detection part.

oh snap you're so fast :O

It was only 2 seconds of work.  Would have done it earlier but I really had to get class work done.  How's it look?


ahah really??!! man i want solve things that fast haha...and it works BEAUTIFUL hahha just testing every kind of situation with "block buildings" i can think of and its sliding off the tops perfectly and falling...this is nothing but amazing hahah im so excited thank you!

oh and about the down button code...you mentioned it being the way it is just because it was only one line of code...so instead of it triggering the event collision..i can make another code block to make it go down instead of using the existing collision code? i can think of that myself if its possible hahah its just that i would like to be able to go down fast and then move left or right after a collision (im not sure what happens but if i go down fast a new piece spawns as soon as a bottom collision occurs, leaving me unable to move left or right)

3
Ask a Question / Re: Position changing every second
« on: February 06, 2013, 10:09:11 pm »
Okay, added the new code in.  You can now move left/right after hitting down OR when collision detection occurs.  Also commented the collision detection part.

oh snap you're so fast :O

4
Ask a Question / Re: Position changing every second
« on: February 06, 2013, 10:08:08 pm »
I have it set to keep going down unless it hits the bottom of the play area (screen height - 32) or it detects another actor (which would be that first part of the code there).  To be able to move while going down would require a bit more work, which is why I hadn't put it in yet.  I added in the faster down movement because it works off the new additional collision detection, making me only need one line of code.  I have method to allow movement while falling so I'll get that done in just a moment for you to look at.

I hope you're learning a lot from my code and comments. I feel like I'm making the game for you :p  It is complicated code, mind you.


haha yes you are! :S this will stop once i get this movement down...the rest i am a little more confident in figuring out...your example is really teaching me a lot although im still trying to wrap my head around how the left and right movements work because like you said it is complicated

5
Ask a Question / Re: Position changing every second
« on: February 06, 2013, 05:58:35 pm »
Tetris has been updated!

Features:
- Blocks cannot be floated!
- New control added: Down arrow will bring your blocks down faster.


yay! i really appreciate all of this!! :D:D i have to figure out a way to repay you hahaha...but was looking at it and i noticed that when <locked> is true, it always wants to go down? im just assuming this because the down control is just a switch to true if its false...although this faster down movement is eventually something i want to include(how did ya know ahaha), this prevents me from moving left or right if i pressed down
which brings me to the floating block issue...its fixed but its locked as it goes down..so i cannot move it anymore...
I DID TRY and add a <set lockposition to false> in what i think is the right spot (check my picture)..and it did work, for a second, but not quite hahah...a whole bunch of problems come up afterwards like controlling multiple blocks, and floating blocks came back...
i see that there is an event made for the possible floating collision check that happens right before the position locks...
does an event have to be made for the number times in a row i think this might happen in a game level/scene? because my game may require the player to move the piece across a couple pieces over lowering heights...like going down stairs (a collision check would occur at each step)

6
Ask a Question / Re: Position changing every second
« on: February 06, 2013, 03:52:20 pm »
One actor = Next Piece display (upper right corner)  The other two are unused.  And yes, I haven't fixed the float but your right, trigger a collision detection after the .2 secs.

so i attempted it but was not successful...does the collision attribute go back to false when there is no longer a collision? i added some blocks in thinking that but it didnt work.. have a picture of what i did...i tried to add an "otherwise set collision to false" block too...do i have to create another attribute for like a real time update of a bottom collision being true or false?

7
Ask a Question / Re: Position changing every second
« on: February 05, 2013, 06:20:19 pm »
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.


ohh wow  :D well its super helpful!!
the example is amazing! I printed it out to look at it more in depth and so i can study it haha...but the issue of it hovering if i quickly move left or right off an existing block still occurs...i have an idea of how i can fix it (another check for collision being true in the "do this after 0.2 seconds" block? ) so ill try it out cause this is actual significant to the gameplay, but if you know what to do already that would be dandy!...
and i notice there are 4 actors, but only the square one spawns, for my game i dont have to randomly spawn the pieces so this isn't really a big issue

8
Ask a Question / Re: Position changing every second
« on: February 05, 2013, 07:46:05 am »
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

9
Ask a Question / Re: Position changing every second
« on: February 04, 2013, 07:28:13 pm »
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

10
Ask a Question / Re: Position changing every second
« on: February 04, 2013, 06:24:32 pm »
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

11
Ask a Question / Re: Position changing every second
« on: February 04, 2013, 11:30:45 am »
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?

12
Ask a Question / Re: Position changing every second
« on: February 04, 2013, 08:32:01 am »
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?

13
Ask a Question / Re: Position changing every second
« on: February 04, 2013, 08:16:38 am »
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


14
Ask a Question / Re: Position changing every second
« on: February 03, 2013, 09:33:11 pm »
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...

15
Ask a Question / Re: Position changing every second
« on: February 03, 2013, 09:32:09 pm »
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?

Pages: 1 2 3 4