brunopalermo's Forum Posts

  • I checked your capx and the menu only appears when you click outside the game window... I don't think you'll be able to avoid that from construct.

  • Yes. Just add the Function object to your capx file. You do that the same way you add a Sprite or any other object, just go and select the Function one...

  • Another alternative would be to implement an invisible hex grid and choose a random position in the grid for each of your bases. But this would make the whole stuff more regularly spaced, of course.

  • Hey TRMG!

    Here's a similar code. I used pick nearest so you don't have to check distance several times. Again, the same warning applies, if the space for spawning the amount of bases you need is too tight it may enter an infinite loop, so, use with caution.

    https://www.dropbox.com/s/x35ltcbwuw313 ... .capx?dl=0

    Hope this helps. Cheers!

  • Yeah. I didn't implement it to check the "going back" lines.

    For instance, if you have 3 particles A, B and C, there are 3 lines: AB, AC and BC. In my implementation it will create AB, AC, BA (which is, essentialy AB backwards), BC, CA (again, AC) and CB (again, BC). The idea was just to show you how to go with the lines. You should treat the code to skip already drawn lines...

    EDIT: in fact, I think it is even drawing lines towards themselves...

  • Here you go...

    https://www.dropbox.com/s/j0f5ti8dvz56c ... .capx?dl=0

    I reduced the number from 80, because it seemed toooooo much. But you can just put whatever you need there. <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • You can implement gesture recognition with basic events, if you really want it.

  • It would greatly help if we could state which objects we want to create dynamically, instead of picking them from a box, like in any other programming framework.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • so i have object x, the player, and 10 instances of object y , enemies. i want, on mouse pressed, for the player to auto aim to the closest enemy. Thanks in advance !

    You just have to use the Pick nearest condition...

    Check this capx: https://www.dropbox.com/s/9q72l7hzzru3j ... .capx?dl=0

    Hope it helps. Cheers!

  • Hey yiuyiu6666,

    Try this capx.

    https://www.dropbox.com/s/elznx406bp0lb ... .capx?dl=0

    Hope this helps. Cheers!

  • Hey yiuyiu6666,

    There isn't such thing as "grousp". You may achieve this in several ways: you may add the bullet behavior to a family, add all objects to that family and bullet them all. You may add each object the bullet behavior and bullet them all. You may add the bullet behavior to one object, pin all other objects to it and bullet it, etc.

    I would suggest the family approach. Also, for what I see in your image, I guess there are both scenario objects and interactive ones. It might be a good approach to have separate families for them, both families with the bullet behavior.

    Hope this helps. Cheers!

  • i see, its not possible set bigger 'B' area? poor c2;/

    Not dynamically. But, in general, the thing you want to do by increasing the layout size can probably be done in another way. If we had more info on that we might find a solution.

  • From the Construct manual:

    "Set canvas size

    Set the size of the canvas area in the page, if appearing inline to the page (i.e. a fullscreen mode is not used). If a fullscreen mode is in use, this effectively changes the size of the Window size project property, which adjusts the size of the viewport."

    As I said before, you can't set layout size dynamically. You are mixing Layout and Viewport/Window. These are two different things. Imagine your construct app/game as something you look through an actual window:

         +--------------------------------+
        /             B                  /
       /          +--------+            /
      /          /   A    /            /
     /          +--------+            /
    +--------------------------------+
    [/code:4xmvrgdt]
    
    B is the full Layout, A is the Window through which you see the Layout. As far as I know you can set the window size dynamically, using set canvas size, but not the layout size.
  • As far as I know, you can't set Layout Height dynamically...

  • Hey !

    I'm not sure I understood it well, but have you tried pinning the button to the slider while it's moving and unpinning it when it stops moving?

    Hope this helps. Cheers.