Coin-coin le Canapin's Forum Posts

  • 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.

  • Change the "set angle" bullet property to "no".

  • I'll take a look at this, thanks.

  • You can also try this custom behavior : (but if you intend to learn how to use construct, that's a better idea to do it all by yourself I guess)

  • Just invert Sprite.Angle and 0 ?

    Should work but I think this question was too easy. I must have missed something.

  • Hi !

    I have an exported project I uploaded on mywebsite/construct/project/

    If I update my project and I upload it again on the same directory, chrome won't refresh c2runtime.js and mywebsite/construct/project/ will display the old version. Even if I ctrl-F5 on mywebsite/construct/project/.

    In order to have the new version working, I must open mywebsite/construct/project/c2runtime.js and do ctrl-F5 on this url.

    This is pretty annoying. Any idea how to fix that ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No problem <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile"> I've updated it today. Now with blood (a lot).

    See it in action : http://canapin.com/construct/tests/gibs/

    Do ctrl-F5 on this url http://canapin.com/construct/tests/gibs/c2runtime.js if it displays the older version with purple rectangles.

    capx : [attachment=0:2u154z7j]gibs.capx[/attachment:2u154z7j]

    It requires the LiteTween behavior by Lunarray : https://dl.dropboxusercontent.com/u/553 ... etween.zip

    There is no comment inside the file but I think it's pretty simple to understand. Most of the events are used to set random or partially random various values.

    The only "important" thing to know is that each gib instance in construct 2 (in the layout tab) MUST have a 1:1 scale. If it doesn't, the second tween behavior won't work as espected and the animation will be glitchy.

    If you need to resize it, do it inside an event like I did (on gibs created -> gibs set scale to 0.2)

  • Thank you.

    I want a really dynamic gameplay so I spend most of my time on this kind of effects.

    I'm currently working on the gibs system : http://canapin.com/construct/tests/gibs/ because I want a lot of jumping meat.

  • Ah yeah sorry, I should have used WASD but I'm on a french keyboard . But the arrow keys also work.

    I paste the gibs on the canvas. By the way, their resolution is very bad (they became kind of blurry) when they are pasted. I don't know why. If you have an idea…

  • That's quite ordinary !

    The thing is that I had never been close to finish a Construct 2 project. So I'm working on a very simple game in order to see its end.

    Because I don't want to do complicated things, it is inspired by Crimsonland. If you don't know it, try it. Amazing game.

    Well, you can try the current state of my project here : http://canapin.com/construct/scarletland/07/

    arrow keys or ZQSD to move the player, left click to shoot.

    A lot of work to do :

    Having a better enemy behavior so they won't tend to group themselve while chasing the player

    Set up a base gameplay : enemy attacks, player HP

    Local co-op (with gamepad)

    And stuff I don't know yet.

  • Seems useful !

  • lunarray don't bother with that. I'm looking for a specific bounce effect where the first "jump" would be higher than the start value.

    I can achieve the same effect by creating multiple easing folowing themselves with differents value. Longer to set up, but it will work.

    Edit : Like this [attachment=0:3c1mbi1q][/attachment:3c1mbi1q]

    The second tween begins when the first one ends.

    However, a nice addition to your amazing behavior would be the possibility to set a start value, not only a target value.

  • Hi. This question is about the pathfinding behavior, which I think uses a lot of CPU.

    If my pathfinder is looking for a mobile target (for example the player), how often should I update its path ? Every tick ? Every 0.X seconds ?

    I also have the same question when having a lot of enemies (30+) looking for the player.