Coin-coin le Canapin's Recent Forum Activity

  • Hi !

    There is one thing that bothers me in Construct 2 since a looong time.

    When you click on export to -> [anything] -> Export files to :

    [attachment=0:2pdzewq2][/attachment:2pdzewq2]

    First of all, the output directory is always reset to a default one one a new Construct 2 start like Users/Canapin/Desktop/New Project. I always save my exports in another custom directory and it would be very, very great if Construct 2 remembered the export directory for a given project.

    It is especially annoying as the used file browser is that [insert a rude term] windows browser which doesn't have an address bar, which makes it terrible to go to our regular output directory.

    Wouldn't be possible to replace it with this better and more suitable file browsing windows ?

    [attachment=1:2pdzewq2][/attachment:2pdzewq2]

  • Hi.

    I would like to know when my character isn't visible anymore when it is hidden behind a tree or a wall (sometimes more than one if the player is bigger than a single wall). When we actually can't see any pixel of it.

    Any idea how to do that ?

  • I'm encountering the same issue.

    On a horizontal sprite which has a 45° angle (purple), the player can walk up.

    On a slope which was drawn that way (blue), the player can't.

    What is the best way to make the player properly walk up on the blue ones ?

    edit : okay my bad, the collision box were messed up on the blue ones. I had to remove some points and now it works perfectly. Also, it was not the same issue as roracle.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well it is done and it was incredibly easy. Why do I focus on complicated things… :l

    The events I used in my loop :

    [attachment=1:3cgw10rt][/attachment:3cgw10rt]

    And the before/after (click on the picture) :

    [attachment=0:3cgw10rt][/attachment:3cgw10rt]

  • Hi,

    Let me explain what I exactly want to achieve

    I have a map :

    [attachment=0:moiwyv22][/attachment:moiwyv22]

    Each square is a sprite. Well in the editor it's from a tilemap object because it's easier to draw large area with this.

    When the layout is created, all the tiles are replaced by a block sprite. But that doesn't matter for my issue I guess.

    So i have a level with a lot of squares and I would like to automatically have slopes on edges, like this :

    [attachment=1:moiwyv22][/attachment:moiwyv22]

    And the blocks need to be sprites because I need to do some actions on them (change opacity and stuff) for other events.

    I don't really care if it takes a few seconds to iterate over all my blocks to set up the slopes on edges because it will be done only once when the layout is created.

    However, it will be done in smaller areas some time when a game occurs, because the blocks are destructibles. New edges will be created by the players so I'll need to change some blocks to slopes, but this is another issue at this time.

    I'm currently trying using an array to do the work but I'm not done finishing yet so I don't know if it will be faster than the previous method.

    I don't know if I explain well my issue

    Edit : How dumb I am. I just have to do this while I'm on my big loop at the start of layout, I can check the tiles positions for each loop index.

  • I'm note 100% to understand all your explanations as I'm not fluent in english.

    I did this following your suggestion :

    [attachment=0:2mkhqyie][/attachment:2mkhqyie]

    It tests only if there are other squares on the left, top left and top position.

    And it takes way too much time : a few seconds for only 100 squares, and I have about 2000 squares in my layout.

    How to improve it ?

    Maybe could I put all my blocks in an array before instead of testing the actual squares ?

  • Hi.

    I have a lot of blocks and their position follow a 32*32 grid.

    For each block I would like to know if there are other blocks around it : top, top right, right, bottom right, bottom, bottom left and so on.

    So I can modify the current block and set the right graphic on it.

    For example, if a block has no other block to its top, top right and right, it has a slope (it will be a sprite special frame, nothing more) from top left to bottom right.

    The same way, if it doesn't have any blocks to its right, bottom right and under it, it will has a slope frop top right to bottom left :

    [attachment=0:1t1wnbjq][/attachment:1t1wnbjq]

    I don't know how to test each block position regarding other ones. Any (efficient) idea ?

  • That's what I did. <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    http://canapin.com/construct/scarletland/08/

  • If you have to use a wait action to make it work, then your events are not set the way they should.

    Construct read events once/tick and from top to bottom.

    Basically, it executes your two conditions "on space released" at the same tick and this is why it doesn't work. Your two "on space released" conditions are both verified and executed.

    So I suggest you to consider making something like this :

    [attachment=0:2f3fe7ub][/attachment:2f3fe7ub]

  • Are you 100% sure this number will eventually reach 0 ? If you are checking a speed, opacity or something like that, it may avoid this value so you have to be less precise.

    For example if round(variable) = 0, or if variable < 1, stuff like that.

  • Thank you for this amazing plugin/behavior. It helped me solving problems I was facing to on almost every project I've worked on with Construct.

    I just have one question. Instead of "creating" an instance of a selected sprite with a specific nickname, would it be possible to just select this sprite ?

    I'll give an exemple to my issue, which is not really an issue, but you'll see what I mean :

    Imagine I have a monster family, which contains :

    • troll
    • skeleton
    • justinBieber

    It also their nicknames.

    Now I have also a gibs family which contains this :

    • trollGibs1
    • trollGibs2
    • skeletonGibs1
    • skeletonGibs2
    • skeletonGibs3
    • skeletonGibs4
    • justinBieberGibs1
    • justinBieberGibs2

    These are their nicknames too.

    Now here are my events spawning gibs for any enemy :

    [attachment=0:1h38umtg][/attachment:1h38umtg]

    That's pretty simple. If the dying enemy is names "skeleton", the loop will look for sprites which have a nickname like "skeletonX" where X is the loop index.

    Basically, it will pick the nicknames skeleton1, skeleton2, skeleton3, skeleton4, spawning the current gibs at each stop of this loop, and when it can't find skeleton5, the loop will stop.

    It works perfectly, exept I don't know how many gibs will spawn when I create the first instance, It even could be 0, so I must destroyed the instance I had just created in my actions in order to launch the while loop which will decide how many gibs (0 to arbitrary number) must be spawned.

    I don't know if I explain well, I'm not fluent in english !

    Well, basically, ma question is : instead of having "nickname : create [instanceName]" would it be possible to have something (action or condition) like "nickname : select/pick [instanceName]" ?

    I guess it's not, because you can't access any sprite property if there is no existing instance… Am I right ?

  • Yeah, the plugin Nickname is incredibly useful. It let you pick/create sprites regarding their new "nickname" attibute, which can be the same on multiple sprites.

    The simplest example of what it can do is spawning a specific object(s) from a family, which is absolutely impossible (as far as I know) with the standard Construct 2.

Coin-coin le Canapin's avatar

Coin-coin le Canapin

Member since 22 Dec, 2010

Twitter
Coin-coin le Canapin has 1 followers

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies