daleinen's Recent Forum Activity

  • Yeah using the old function system was tempting, but both the scripting and the global variable solution sounds promising. Thanks for the suggestions!

  • I have a dialog system using an array that allows the player to select a response (for example Dialog.At(4, 1) == "Take the left path"). And when they select that a function will be called (Dialog.At(5, 1) == "LeftPath").

    I map all the dialog functions and I can call them with a string. But how would I pass the parameters (also in the array for example Dialog.At(6, 1) == "Steep")?

    The "forward parameters" isn't clear to me how it works. I also considered diving into scripting but wasn't sure that's the best way either. I don't see how to access the array from scripting.

    Any help or advice would be appreciated. Thank you!

  • Once I got it converted for my specific needs it works great. Thanks you both for the help and taking the time!

  • That would explain the behavior of the bug I'm seeing. But I'm not creating them, I'm moving them so they should be available right? Here is the function.

    Line 6 does not come up as true, but line 8 does.

    The IslandCollisionWorkaround is object that I'm using to test if the tilemaps are overlapping.

    What's even more confusing to me is that without the "wait" actions, then line 8 IS NOT true and says there are no overlaps. But with the waits in the function it recognizes that there are overlaps.

  • My goal is to have 20 pre-made islands randomly placed on an overworld map that don't overlap.

    I'd love to hear if anyone has any clever solutions. I can explain what I've tried below, but it's a bit lengthy and I'm not convinced it's the best approach anyway so it's maybe not necessary to read;

    At the start of the layout the islands are outside of the layout. They all have an instance variable ID.

    Actually what I'm testing is a sprite that's set to the same size and location then pinned to the island tilemap since I can't test if tilemaps are overlapping objects for some reason.

    Then that object is placed into two families because that's the only way I can pick two of the same object and differentiate between the two (if family1 is overlapping family 2).

    At the start of the layout I call a function (with the islands ID as parameter) to place the first island randomly. Then I check to see if the island is overlapping another island (it's not because it's the first island).

    If it is overlapping, I call the same function again with the same island ID.

    If it is not overlapping I call the function with the islandID + 1.

    And I repeat that until all the islands have been placed.

    Or at least that's how it's supposed to happen. In reality what happens is it doesn't see the islands as overlapping so it doesn't call the function again, it goes on to the next island. But I know it can pick the overlapping objects because after all the islands have been placed I check to see if any are overlapping and it is aware that they overlap.

    When I don't check to see if that specific instance in the being placed in the function is overlapping (just checking if any islands are overlapping)it runs into the first point of an overlapping island (usually around the 6th island but depends), and then continually calls the same function even if it's not placed somewhere not overlapping.

    So I'm sure there's some bug somewhere, but I'm concerned this is just not the right approach and may take too long for the computer to iterate to a configuration that has no overlapping pieces anyway.

    Any help anyone has would be appreciated.

  • It worked! Thank you.

  • I'm using text objects not sprite font. I didn't realize sprite font had CharacterWidth though. That would be a lot more accurate with my method of taking character count, and dividing that by an approximate line length, but it could still cut off text (depending on if the final word in a word wrapped line is "I" or "superimposed".

    I think there's no way around it but to manually place "newline" in the text to control the size of the text box (or the text box background 9-patch to be exact).

    But thank you both for the ideas. I appreciate it!

  • Ah! Tokencount. And then use "newline" as a separator.

    What I have are paragraphs stored in an array. I was hoping there would be a way to automatically get the height (or in this case line count based on number of characters). Since ten "." and ten "X" have very different widths there is no way to tell just by character count how many lines there will be.

    I'd definitely have more control with your method. I suppose while playtesting if a line looks odd I either add or subtract a line.

    Thank you for the suggestion (and for the short story you've made in your example)! I'll see how it works out.

  • I have a dialog system set up but I'm having trouble sizing the box to fit varying amounts of text per line. Most lines turn out just fine.

    But some look strange.

    Like here the text will not be centered and it will not display all the dialog. Words at the end will be missing (in this case it's missing the character's name and a ?).

    Does anyone have any ideas how to always make the text box the right size to fit the amount of text in a given line?

    What I have now is on the "displayLine" function:

    DialogText Set Height to max(12, ceil(len(Dialog.At(lineOfDialog)) / 35) * 14)

    DialogTextBackground Set Height to max(12, ceil(len(Dialog.At(lineOfDialog)) / 35) * 14 + 6)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I am converting my game into a pixel art game. It was going well, until I ran into dealing with text. No matter the size I enter it adds anti-aliasing to the text. Is changing all the text in my game to Sprite Font my only option?

  • I am leading a team of 5 including a composer, writer, artist (specifically for characters), programmer and animator.

    We've been at work on this project for a while and it's coming along nicely but is apparent we need someone who can make atmospheric backgrounds for the music, dialog, and characters that are already in place.

    Most of the scenes are underwater or at least a large portion is underwater. The main challenge would be coming up with a design that matches the other artist's characters. But the characters are flexible enough that there is plenty of leeway.

    I don't have a budget and would prefer a partner to share profits from sales, but the arrangement I have with the other artist is $15-$35 per sprite. Obviously that's well under what an artist is worth but I could probably match that or something equivalent if that was the preference.

    Contact me if you are interested.

  • Done.

daleinen's avatar

daleinen

Early Adopter

Member since 9 Aug, 2014

None one is following daleinen yet!

Trophy Case

  • 10-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies