Yann's Recent Forum Activity

  • You need 2 things :

    • the size of your array to be odd numbers
    • your starting coordinate of the algo to be odd as well

    So make the Array size 39,29

    And event 3 replace the 2 first actions by:

    System: set x to floor(random((Array.Width-1)/2))*2+1
    System: set y to floor(random((Array.Height-1)/2))*2+1
  • do you want your particles to collide? or is it just a eyecandy fx ?

  • I did a tetris game some weeks ago, and to get the shape I simply wrote down some relative coordinates.

    It looked like

    -2,0|-1,0|0,0|1,0#0,-2|0,-1|0,0|0,1
    0,0|1,0|0,-1|1,1
    -1,0|0,0|1,0|0,-1#0,-1|0,0|0,1|1,0#-1,0|0,0|1,0|0,1#0,-1|0,0|0,1|-1,0
    -1,0|0,0|0,-1|1,-1#-1,-1|-1,0|0,0|0,1
    -1,-1|0,-1|0,0|1,0#0,1|0,0|1,0|1,-1
    -1,0|0,0|1,0|1,1#0,1|0,0|0,-1|1,-1#-1,0|-1,1|0,1|1,1#-1,1|0,1|0,0|0,-1
    -1,1|-1,0|0,0|1,0#1,1|0,1|0,0|0,-1#-1,1|0,1|1,1|1,0#0,1|0,0|0,-1|-1,-1

    With 4 levels of token:

    a line break (newline) separates each shapes

    a # separates each possible rotation

    a | separates each block coordinates

    a , separates X and Y coordinates.

    Then I just had to select a random line, and to make it simple I just used the first rotation on spawn.

    Also note that in tetris all shapes are made of 4 blocks that made things easier too.

    Then I just had to know the current shape and move the blocks accordingly.

    Tetris always have one shape moving at a time so it made things easy to. I just had to flag the blocks as moving or not (boolean)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What would you want your particles to do ?

  • That's a weird question, so I'm interested.

    What do you call "events of the same type"

    And can you give us a practical game situation where it would be usefull.

    Anyway I think GenkiGenga's solution is probably what you are looking for. But just to be sure.

  • Nothing wrong with your events.

    It's just that... The Array object isn't in the layout.

    (as a side note you don't need the TokenVar variable you can just use loopindex("Y")*3+loopindex("X") )

  • orcKilling.capx

    really basic no animation just dumb sprites. (:

  • Ok I think I understand, you use the player_mask sprite so the feet only collides with walls, the player_collision is in fact a hitbox, and then the player is just the visual.

    And you do the same for orcs.

    That makes sens and I would probably do the same.

    However, your capx is already too complex for me to make any changes. I prefer starting from scratch and show you the how to with it.

    You'll probably understand better and be able to implement it in your own capx.

  • First, what is the use of the orc_mask ?

    Second, shouldn't it be easier to name your animation "running_0" "running_45" "running_90" etc and just make one call like Set animation to "running_"&self.DIR ?

    Third we'll see after you answered these question, but what you wana do is pretty doable

  • no you didn't understand my point so I think I'll make a capx 'cause we will run in circle.

    Hop! familyOfEnemies.capx

  • Add a family variable called 'point' which hold the amount of point for each object in the family and then

    Global number score = 0
    ObjectA: On collision with family1
      -> System: add family1.point to score
      -> family1: destroy
Yann's avatar

Yann

Member since 31 Dec, 2010

Twitter
Yann has 5 followers

Connect with Yann