dop2000's Forum Posts

  • KeeghanM thanks for the tip!

    Do you know what the "sid" tag is for in the event sheets XMLs?

    <action id="0" name="Set text" sid="140336039528208" type="GameOverText">[/code:34f6o06t]
    
    I was also thinking about making some bulk changes by editing XML files, but I was worried about this sid tag.. What if it's somehow related to the object which I'm replacing?
  • I also recommend you fixing your animations - crop unused space, make sure origin point is in the same position on all frames, simplify your collision polygons. Your sprites are very small, you don't need complex collision polygons, they are bad for performance.

  • Add this line at the start of layout:

    Player -> Set position to another object -> to CharacterAnimation

    It should be before the Pin!

    And fix Origin image point position for ALL your animations (character, enemy, walking, standing etc.) and for all frames inside these animations.

  • Then you probably need to set the full text with transparent font or something like that. (Setting text invisible won't work, the system will not render it)

    Then Wait 0.01 seconds, measure the text and set the correct bubble size.

    And then erase the text and fill it in again letter by letter with the typewriter effect.

  • You can use Tex.TextWidth and Text.TextHeight expressions to get the actual size of text.

    There is one problem with it though - you can't set text and then immediately measure its size. The system needs time to render the text, so you need to wait until the next tick.

    Insert Wait 0.01 between setting the text and changing your bubble sprite size.

  • KingKong1234 The link is broken and also you need to share the CAPX file, not CAPROJ.

    To create CAPX file, save your project as a single file.

    If you can't post full links, try to remove "https://" part of the url.

  • TRMG Creating this data manually keyframe by keyframe would be a really long and boring job and the results may not be very good.

    Why don't you look for a special software that can create simple animations and export them in text format?

    That guy used Adobe Flash, I had some experience with it and it's a great tool for creating animations.

    I watched the video again, he actually exported animations in JSON format, not XML.

    So you'll need to parse JSON strings, I'm sure it's doable and still must be much easier than preparing all animations by hand.

  • If you google "Construct 2 XML", there are quite a few tutorials.

    I assumed you want to use XML files because the guy in the video used it. (at least I think that was XML, not sure)

    You might choose CSV or some other format to store animation. By the way, how are you going to prepare all these animation sequences?

    I personally prefer CSV, there are a few handy plugins by rexrainbow to work with this format. One called CSV2Array, so I'm guessing it can parse CSV directly into the array:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Man, no offense, but this is the most terrible project I've ever seen. It's a total mess..

    It's absolutely impossible to figure out what's going on and how is it supposed to work.

    You have 20 sprites and all of them are called "SpriteXX"?

    Layout has 11 layers, most of which consist of just 1 object?

    Variables called "obj" and "src"?

    And your project size is 40Mb?

    I'll try to guess what your problem is.

    You want your animation to stop on frame 16. After that user should click red button and the animation will continue. Is this right?

    Your mistake is that even when you restart animation, it gets stopped again on frame 16.

    Here is one of the ways to fix it:

    The proper way to do it would be splitting your animation in two. After one animation is finished, wait for user to click the button, then start the second animation.

  • I use postimages.org or imgur.com

  • Boolean attack is the deadliest of all!

    FabianB please save your project as CAPX file, upload it to dropbox and share the link.

    It's not possible to help you without seeing your code.

  • Scrap my previous comment, brunopalermo gave me an idea how to do this <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    I made a demo:

    http://doptrix.com/C2/BoatWalking/

    capx

    Shadow object is for simplicity and to demonstrate the idea. You can do it without it.

  • Your plan seems good to me.

    I would probably do this with one 2D array object with a couple of instance variables.

    Store all animation sheets in text files (CSV, XML) and load them into the array when you need them.

    Say, when player picks up a new sword, you open LongSword_animations.XML and create a bunch of AnimationArray instances:

    1. create AnimationArray, set variable object_type="LongSword", animation_type="idle"

    2. create AnimationArray, set variable object_type="LongSword", animation_type="attack"

    etc.

    Then you fill in these arrays with data from the XML.

    You'll need to code a bunch of functions, but you'll only have to do it once and will be able to reuse them for all animated objects.

  • In layer properties you can set layer background to black and transparent=No.

    Or do you mean something else?