Arima's Forum Posts

  • It's actually easier than it seems via events. All you need to do is put all the sprites you want to save the position of in a family, then on end of layout, for each object in the family, use loopindex to write the object name in one column of an array, the x position in another, etc.

    At start of layout, run through the column of object names and create from that. It all could probably be done with 2-3 events.

  • It doesn't work with object names though.

    What would be really awesome is a filter by parameter - so you could type in an object name or something else, like how search works now, but it would only show events with whatever you typed.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Wow, awesome! Thanks guys!

    I've got a weird bug now where it doesn't write sometimes. What's weird about it is if I debug it writes properly. I'll try to make a .cap.

  • When writing, if a word doesn't fit in the box anymore it jumps down a line. Would there be any way to make it know if a word isn't going to fit, and if so move it down before it starts writing it? Like, instead of creating the sprites one by one, create them all and place them, then one by one make them visible?

  • 1. when you left click you destroyed the fontsprite, and do not recreate it.

    I should have mentioned, the spritefont is in a container with the panel, so it gets created with the panel in event 2.

    also you don't need to destroy the panel and remake it, you can just move it, unless you're just testing something. for the fontsprite, just clear it, it will be invisible until further notice

    I'm going to be using multiple spritefont boxes, so I need to create/destroy them.

    2.not sure if this was your intention, but "write text" at 0 milliseconds, writes one letter per tick

    if you want the text to come instantly, just use "show text"

    Yeah, that's what I thought. I was experimenting with it and didn't bother cleaning up parts of it.

    also, I think something may be wrong with the cap, because I tried changing some things, and they wouldn't work, and I was able to make them work in a fresh cap.

    That was created from a fresh .cap, so I'm not sure why recreating it again would fix it.

    as far as setting the length and width of the object

    I guess I forgot that part

    consider it done - sometime in the next few days, I'll have an update

    Sweet, thanks!

    Edit: Setting the sprite and character range every frame appears to have been what was causing the crash.

  • Huh. Are you using both the latest versions of construct and the spritefont? Otherwise, I have no idea why it's not crashing for you.

    I've managed to work around that weird behavior by clearing the text then destroying them. What I'm guessing is happening is the spritefont object is getting deleted but it's not deleting the instances of letters it creates.

  • Thanks for the y-align feature, it works great.

    Aside from that tho, I'm getting lots of freezes and crashes while working with it. I've been having a hard time making .caps to send to you because deleting everything else out of the .cap causes it to act differently.

    Here's one: http://www.amirai.net/misc/spritetext.cap Click around randomly. After about 5 clicks, the app crashes. Deleting the spritefont stops it from crashing.

    Also, would it be possible to add debugger info? And how do you set the width of the box at runtime?

    Edit: Add the action "spritefont: set phrase position to mousex, mousey" the event 3 to get some weird behavior. It stops crashing, but now spritefonts don't get deleted upon clicking anymore and occasionally it writes "tex" instead of "text" and it looks like there are two extra letters behind the first two, and the x is misaligned a pixel.

    Edit 2: Drag the mouse quickly while clicking to see the extra two letters I mentioned.

  • i could also add a "automatically set y offsets to hotspot function.

    That would be awesome. It would be a bit time consuming to set the offset for each letter.

  • After using the plugin a bit I have a suggestion, I don't know how hard it would be to implement, tho.

    At the moment all sprites are aligned by the top. Is there any way to make them aligned by their hotspot instead? It's a lot faster and easier to move hotspots than it is to resize the canvas and move the images.

  • Firstly, nice work on this. It's something both construct and I have really needed.

    I tried opening the "Hello world" .cap, and changed the 'show text' action to write text, and it doesn't show the H for some reason.

    Edit: Never mind, it's because I used a capital H.

  • A java runtime would rock!

  • Does this work?

    If sprite is not moving

    if object value "flagged" = 0

    pick closest object to sprite.x, sprite.y

    • sprite: move to object

    sprite arrives at target

    sprite is overlapping object

    • set value 'flagged' to 1
  • It's also a matter of the gpu always being 1 frame behind the cpu. Therefore, regardless of what you do, the mouse is always lagging behind by a little bit.

    I doubt there's any way to fix that, though it would be nice. There was a thread about it on the indiegamer forums not long ago, tho... http://forums.indiegamer.com/showthread.php?t=17703

  • Nice find!

  • Wow. That does look very impressive.