Basilboy's Forum Posts

  • bumpity

  • Is it possible to pin an object to always be at the center of another object without the use of imagepoints?

  • I've tried adding scrollto behavior to two objects but it doesn't make it work like it should, because if one of them keeps going in a certain direction the camera won't work properely and both characters can't be seen. Is there an example of this anywhere or any idea on how this is accomplished successfully?

  • Hello, I am currently finalizing the concept phase of my upcoming project, and I aim to make it an open world side scroller.

    I have been trying to wrap my head around how this can be done and so far the only great game that makes you feel you're in a huge world in a side scroller is Metroid on the NES, or any metroidvania type game really.

    However that idea seems to only work with environments that contain rooms, such as caves, dungeons, etc. Whereas my game is taken place only outdoors.

    My plan for the game to feel nonlinear for its side scrolling nature is to have branching paths where at a certain point in a layout, the player will see that they can tap up on the controls to enter a new area. The problem here is that this seems to be known as a confusing game mechanic for a side scroller because it can be confusing to get a sense of where the player is after doing so. A crude example, but Friday the 13th on the NES uses this mechanic I'm talking about, although not executed very well.

    So I'm wondering if anyone knows any good games that have pulled this off successfully? I'm not too sure how to explain it very well but it's basically a normal side scroller whereas you can not only enter new areas from going along the x axis, but from the y axis as well (when there's an indicator like an arrow or something). Thanks!

    Edit: to clarify, I'm not talking about going up a ladder when I refer to the y axis, I mean like the player can see what's on the horizon and go there when they are able to. I would say it's similar (or possibly exactly alike) to pressing up in front of an entrance to a building and you go to the new area.

  • If I fill a cell within an array with a token expression, say,

    set at x: 0

    value: "apples;oranges;bananas"

    how would I be able to change any ONE of these words in another action?

    like for example in the future if I wanted to just change apples to kiwis, and not affecting the rest of the expression.

    So that I would have: "kiwis;oranges;bananas"

    HELP PLS

  • Hello, I'm trying to replicate zelda 2's movement with the platform behavior.

    This is all I have been able to get from 60fps footage.

    Link moves at a maximum speed of 90 pixels per second. (90 pixels in 60 frames.)

    From rest to movement, he moves 75 pixels in one second.

    From rest to 90 pixels it took 70 frames (1.16666667 seconds)

    The time between the 75th pixel and the 90th pixel was 10 frames (0.166666667 seconds)

    Is this enough to find rate of acceleration per second per second? Please help, physics is not my strongpoint.

    Here is the footage

    https://dl.dropboxusercontent.com/u/308 ... ccel-1.m4v

    In case you can download it and try to find out too

  • I would second the suggestion that you look into regular expressions. They really are made for exactly what you seem to be trying to do here. Using regexs, you can do more versatile translations, do them more efficiently. For example, I might try something like

    > var input; // this is the text you are going to translate
    var in; //a temporary array to hold words
    var t; //temp
    var output = "";
    in = in.split(" ");
    for (var i in in) {
      if (null != (t = in[i].match(/([~aeiou])([aeiou])([~aeiou])([a-z]*)/i))){
        output += " " + t[4] + t[2] + t[3] + t[3] + t[1]
      }
    }
    
    [/code:14v1fmad]
    Pardon any mistakes. I am new to javascript, and i have not tested this at all. It's just to give you a general idea of what you might do.
    
    What this does is split an input sentance into words based on spaces. Then it tries to match each word against a regular expression, which is the funky bit after in[i].match(). The regular expression looks first for a nonvowel, then a vowel, then another nonvowel, then it considers the word matched and includes any letters that come after that. the regex stores the things it finds in the array t. For example, if you fed it the word "language", it would first match the whole things and store it in t[0] = "language". The subsequent parts of the array contain the groups in the regex, so t = ("language","l","a","n","guage").  The line that starts with output +=  will add a space, which was removed in the split, then stitch the word back together from the array t in a suitable mangled fashion: guageannl. similarly, you could feed it "lol" and you would get "olll", or give it "similar" and get "ilarimms". You can also make it do letter substitutions and other crazy shenanigans. It becomes a roll your own, extra complicated form of pig latin!
    
    Was this at all what you were looking for?
    

    You guys seem to be going into intense detail about the code and programming behind it all, I just want to know how this can be used for entire sentences and not only words.

  • > This is amazing. Would this be able to translate each word within entire sentences too?

    >

    That would be up to you With C2 you can manipulate text any way you like, it's all up to your ability to use it.

    [quote:csw01rf6]I don't think the idea itself is very complicated. The steps to my idea when it translates a word would be:

    1. Determine how many letters are in the word

    2. Determine the placement of vowels in the word (so if an "a" is the first letter, or the second, or the third, etc)

    3. Determine how many vowels there are

    4. Translate the word

    1-3 are easy and you've seen how to. 4 is up to you because the meaning of 'translate' is what you need it to be.

    Just one tip, you could reduce the amount of code significantly if you learn regular express?ons (regex). Look it up in the C2 manual (where you won't learn anything unfortunately) or better, Google 'javascript regex'. My usage of it above is very basic. You can do a lot more sophisticated things with it.

    So learn the basic text manipulat?on stuff (left, mid, right, tokenat, etc) and then after that Regex if you feel you want/need to.

    That would take too long; It's all too complicated for me to understand, it took me an entire month to understand arrays and arrays are relatively simple. I'm not too sure how to make this system work with entire sentences.

  • This is amazing. Would this be able to translate each word within entire sentences too?

  • I'd like to create something where certain text is changed based on a language parser system. For those of you that have played world of warcraft, that's exactly what I'm trying to create (when opposing factions try to speak to eachother, a 'lol' may come out as 'bur' for someone not on the same faction)

    I don't think anybody's cracked the code exactly for how Blizzard actually does it, but from what I've been able to gather is that the word that comes out depends on what vowels are in the word and the arrangement of the vowels, as well as how many letters the word contains.

    And there's a predetermined list of all possible translations to come out based on the number of letters of a word, for example:

    two letter words: An, Ko, Lo, Lu, Me, Ne, Re, Ru, Se, Ti, Va, Ve

    three letter words: Ash, Bor, Bur, Far, Gol, Hir, Lon, Mod, Nud, Ras, Ver, Vil, Vos

    etc.

    You can see the full list here http://www.wowwiki.com/Common_%28language%29

    Anyways, I believe I can figure it out as long as I know if it's possible in construct 2 to do any of the following based on the text of a text object: compare letters in each word, compare the vowels of each word, compare the letter count of each word, and possibly compare the placement of vowels in a word, If any of that is possible, then I may be able to figure it out. However I have no idea which expressions correlate to this.

    I don't think the idea itself is very complicated. The steps to my idea when it translates a word would be:

    1. Determine how many letters are in the word

    2. Determine the placement of vowels in the word (so if an "a" is the first letter, or the second, or the third, etc)

    3. Determine how many vowels there are

    4. Translate the word

    So, 'lol' would translate different than what 'all' would be because the placement of vowels is different. See what i'm saying? <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    Thanks for reading, I hope you'll be able to help out!

  • Two instances or > 2? Maybe use a Family, or use their IID, or object indexing, e.g. Sprite(0), Sprite(1) etc. There are threads and/or tutorials discussing this.

    Could you direct me to them? I don't know what to search for when it comes to this question. It's a little complicated for me.

  • I ran out of space in the title but, how do I have multiple instances of a single object successfully interact with each other?

    I want to make a simple combat test. A single sprite object called player and they have instance variables: Dodge, strength, and health, and I want to be able to have it so that every second both objects are subtracting a random amount from the others health (because they are fighting). There are two instances of them on the screen, and they essentially target each other.

    My problem is I don't know how to properly make the events for this because it is only one object. If I had two different objects then it would be easy, but I don't know how to use two separate instances of ONE object interact with each other as successfully as two different objects. Do you know what I mean? It's kind of hard for me to explain.

    The method I'm thinking about is to have another instance variable called "target", and events depending on distance. So instance A gets close to instance B. Instance A's "target" variable gets the value of instance B's instance ID. And instance B gets instance A's. But I have no clue how the events would look like for this.

    Please help! Thanks bye

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Your method seems to be based on 2D platformers, I probably should have specified it's a top down game

  • Just simple enemies that wander in a single direction, and change their direction appropriately when they collide with a solid. I'm trying to make a simple bomberman clone, and surprisingly this has been the most challenging part to think of. Every attempt I have ever made, the enemy always ends up going through walls, and it's quite frustrating. I've been trying to substitute "on collision" with "is overlapping" combined with triggered once, as I've heard that 'on collision' can be cpu intensive.

    pls help!

  • Method 1: One tilemap of an image with the solids behavior serving as the floor, and one tilemap of the same image without the solids behavior and serves as the background.

    Method 2: One tilemap of an image that is just the background, and an invisible tilemap that is only a 16 x 16 image with the solids behavior and is tiled wherever it must be solid.

    Here's a link to a capx showing my example

    https://dl.dropboxusercontent.com/u/308 ... thods.capx

    I'd like to know which method is better performance wise. Thanks!

    Ashley, you might know this answer better than anyone though