xeed's Forum Posts

  • Hi,

    layer 0 is full of sprites made solid. layer 1 has sprites without that behaviour. The player can't walk along the upper sprites, because the sprites in the first layer are solid.

    How to create a kind of whitelist for moving?

  • yes, i guess only sprites can be "blocked" with r49-. I dont see a way to make a tiled background solid, which would also make no sense at all.

    U need minimum 2 layers. 1 to get a background, and 1 for solid elements and the player.

  • oh ok, i didn't open the system folder in the actions panel before. Thank you :)

  • I'd see it, but it is not available for keywords like "loopindex", which are defined before the action.

    Anyway, i tried to fit the coordinates of the grid into an array, but the output doesn't work. Text keeps "0". U got any ideas?

    <img src="http://85.214.39.20/shared/arrayAccess2.jpg" border="0" />

  • bump for "tiled array" editor <img src="smileys/smiley2.gif" border="0" align="middle" />

  • therefore u need that parametric view of your circle:

    (r*cos(t)+x0,r*sin(t)+y0)

    else you need the distance/2 between A and B, the "rotation point". at the start of ellipse events, there must be

    xk=r*cos(t0)+x0

    yk=r*sin(t0)+y0

    if this is correct u need

    tan(startAngle)=sin(t0)/cos(t0)

    for the following frames.

    when u got this, the new point of C is

    x= radius*cos(endAngle)

    y= radius*sin(endAngle)

    If u speak german, this might help you:

    uni-protokolle.de/foren/viewt/45551,0.html

    for instance:

    t0=10?=Pi/18

    t1=120?=2/3*Pi

    (1,2)=(2*cos(t0)+x0; 2*sin(t0)+y0)

    x0=1-2*cos(Pi/18 )=-0,969615506

    y0=2-2*sin(Pi/18 )=1,652703645

    target point:

    xk=-1,969615506

    yk=3,384754453

  • how did you make the background solid?

  • Is there any keyword list here on Scirra to take a look at the sense of keywords like "Loopindex" in the Event Editor?

    A kind of expression / function list for c2?

  • Is there no way to set the array grid data without having a grid as sprites?

  • hen, you will have a "For each Ground" loop in which 2 actions Array.Set at XY will be used.

    First one: X is Loopindex, Y is 0, Value is Ground.X

    Second : X is Loopindex, Y is 1, Value is Ground.Y

    And there you have it. Your array will be filled with the X and Y positions of each Ground sprite instance.

    To access it : Array.At(X,Y)

    If I want the position X of my 9th instance : Array.At(9,0) (9 is the 9th instance, 0 is X).

    If I want the position Y of my 52th instance : Array.At(52,1)

    This is the information i was searching for. Just didnt know how to access more than one value for an instance.

    I will try this and post a little tut for success in time. :-)

  • So I should use the index of an array as pixel positions?

    I'm not sure if this is the best solution.. <img src="smileys/smiley24.gif" border="0" align="middle" />

  • jump = shift key.

    U can not change this binding with r49-.

  • 2 numbers per instance, x_pos and y_pos

    (I guess)...declared as Instance Variables

    Dont really know if i need 2-dimension array to store a grid in c2. But if it is, how do i access mapGrid[4,6] for instance? I did not find a solution for this before, maybe too cause i dont know most of the expressions. But also did not find a expressions.wiki here anywhere. The link to the expression help inside c2 does not work.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • That helps a lot, Thanks! :)

    I did put the coordinates in an Array before, to use them later again for checking the nearest position to the square midpoints.

    But how can I access the single values now in this filled array? It is one-Dimensional and has 2 "Instance Variables", in which I hope they are the values for EVERY element, not for the whole array. ^^ If its global I dont see a way to solve this problem.

    (If I made this, I will create a little Tutorial about adjustment with nooby-placed objects. :D )

    <img src="http://85.214.39.20/shared/arrayAccess.jpg" border="0" />

  • I am from Germany. At this Point Thanks for your fast support. :)

    Made the ground now as tiled background, and as a symbolic grid. On the ground are many (transparent) PNG's on the upper layer. These are so much, that it would take too long to arrange them manually with click->x,y.

    I am gonna try this with an array. In the array I set the square postitions. Then I check for every sprite instance if it's near the upper left position of any square to be pointed at listed in the array. I think this is the best solution until tiled maps are supported.