Mallets's Recent Forum Activity

  • I'm designing a level that is made of narrow platforms. Each platform has square sine behavior, and every 3 seconds shifts to the right, then back 3 seconds later. The problem is that if the player is standing on a platform when it changes positions, he will move along with it! I want the player to stay in place so that if he doesn't jump before the platforms move, he will fall. It seems that the player's position is linked to the position of the platform he's standing on.

  • Having never done an achievements system before, I could do it in what is certainly a very inefficient way. I bet that someone out there knows of a convenient and code-efficient way!

    My current system is as follows: I have 16 achievements, each with an icon that is gray if not completed or colored if completed.

    In an event, once the player's save file is loaded, I have 16 separate conditions checking to see if each achievement is met. For example, collect X amount of money or play X amount of hours. Once triggered, the achievement sprites have a variable for "IsComplete" that gets turned "true." Any icon that is "IsComplete" changes to its 2nd frame, which is a colored version of the sprite.

    EXAMPLE:

    If sAchievementIcon.Number = 1 & Hours played >= 50, set "IsComplete" to "true."

    If sAchievementIcon.IsComplete = "true," set frame from 0 to 1.

    I suppose this could be done in an array, but the conditions for the achievements are not always as simple as "this value is greater than or equal to X." Some achievements involve doing multiple things at once (having a powerup while killing a certain enemy, completing two stages in under 20 seconds, etc), so putting the condition for each achievement in the array is probably more complex than it's worth. So my solution is simply to have 16 separate events that check each time the player's save data is loaded, which seems really inefficient, but is much more user friendly than trying to force unique achievement conditions into arrays.

    Thank you!

  • Wow! This is exactly what I was going for. Thanks so much taking the time to help me out with this! <3

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That would be amazing, oosyrag. I have spent more time than I care to admit trying to get this nailed down. I will continue to take your methods as you described and try to come up with something, but if you do get the chance to throw together a simple example, I would be forever in your favor for it.

    Thanks!

  • Hello,

    So my question is basically this:

    Imagine that you have a paragraph of text. You play as a block that can run and jump. Whenever you collide with the paragraph of text, whatever characters you touch instantly get destroyed, but the rest of the paragraph remains visible and intact.

    I have been attempting to use Rex's Layouter plugin and all its relevant behaviors to display a textbox object (NOT a text object), but I don't believe line breaks are possible even when the textbox type is "typearea."

    The methods I can think of would be extremely tedious, such as using a sprite font and storing the paragraph of text in an array, then creating an instance of the sprite font for each character in the paragraph and placing them by code instead of C2 doing it automatically.

  • Currently I'm collaborating via Dropbox using a shared folder for everyone who's working on the project. But only one person can work on the file at a time or else the copies start to become conflicted. So we always have to check that nobody else is using the dropbox files before we can start working on it.

    On the other hand, I know that Github and BitBucket are more tailored for collaboration, but others posting in these forums have noted that they don't work very well for Construct 2 in some cases (for example: https://www.scirra.com/forum/github-and-c2-a-best-way-to-do-it_t109440

    Is there a resource that will us to work on the same project on our own schedules and then simply merge or combine the finished results into a functional project?

  • Yes! Your capx was beautifully done. I don't know why I had such trouble with it. I had previously played with the physics properties but couldn't quite get it going. Thank you so much for this well-made example!

  • Say that the player controls a box or a hand at the bottom of the screen and there is a very long narrow stick or a stack of plates balanced on the box. The stick begins to lean and the player has to move left or right with the mouse to correct it so that it doesn't fall. If you've ever held a broom upside down and tried to balance it in your palm it would be the same idea.

    I started off trying to use physics but I kept getting out of control bouncing or very unpredictable interactions. I would rather be able to do it with physics rather than coding everything manually (every tick, add 1 to stick speed, adjust angle X pixels, etc, unless player moves Y pixels, then adjust stick by Z pixels, etc), but even knowing the basic idea I have no idea where to start, as all my events so far have no produced anything useful.

  • I assume this is just as easily done with a combination if dictionaries AND arrays inside the master dictionary?

  • That's a very smart way to do it! Thank you!

  • I'm currently using a .json file to save and load my player save data. I want to use a separate dictionary for some other data, but I want to be able to write both dictionaries (and possibly arrays) as a single save file on the player's computer. Is this possible using the single .json file? Or will I have to write multiple .json files and somehow zip them into a new file?

    The "append file" action in NW.js would work to save additional dictionaries, but when I load that data, how would C2 know to separate the data into the correct dictionaries?

  • This applies to the editor only, but I have several different textboxes on a layout, but because the text object is always invisible, the only way to see the actual size of the boxes is to click on one and highlight it. This is slow when you have to precisely position many different text objects relative to each other.

    There's no built-in "solid" or "shade" option so that you can see these in the editor. Does anyone know of a way to make working with the text object easier?

Mallets's avatar

Mallets

Member since 16 May, 2015

None one is following Mallets yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies