ome6a1717's Forum Posts

  • Ashley - all you need is one large image with an animation and you'r'e already there

  • I have a problem I've ran into a few times, and I'm curious as to the reasoning. Anytime I do a "set sprite position to xy" and change the animation simultaneously, I actually see the new animation in the old position for the very beginning millisecond of the tick.

    I do this in order to maneuver around having to use the platform/bullet tool for incredibly complex movements.

    ie. I have a blob that is falling from the ceiling. I play the drop animation, and once finished, it needs to go to the falling animation. However in order to keep the "edge" of the blob on the wall, the origin image point can't move, so it needs to change position once the drop animation is finished in order to look smooth. If I do an "on animation finished, play "fall animation" & set sprite location to new location, I will see the sprite at the old location so fast that I can't even pause it in time, regardless of what order my code is in.

    Is there a better way to do stuff like this?

  • Ethan - Actually I believe it doesn't use your typical memory ram; it uses vram. Once you get to ~150mbs or so you will notice a small "stutter" on the start of the layout. I have a bit of a super computer so I haven't figured out what's considered too much, but you probably don't want to go any higher than the 100-150 mb range.

  • blackhornet & Magistross - beautiful! Using a "for" event loop with loopindex works perfectly. Thanks so much!

  • Magistross

    Here's what I'm trying to do slightly based on some of the ideas in yours:

    I know its not, but in my mind, this is what this current event list is doing:

    Checks every X value to determine if ItemName exists. If it does, set the loopindex (which would be the CurX of the array) to a variable to add to the existing item's quantity. If it doesn't exist but finds an "unassigned" value, adds the item to inventory. If neither are true (meaning the item is not currently in the inventory and there is no bag space), do nothing.

    I'm beginning to think loopindex isn't working like I think it is, however.

  • Magistross - I think this is almost what I'm looking for, but I'm having trouble understanding why this is working and how I can apply it to mine

    It doesn't look like the "itemindex" function is being called at all; is it only being used to store a variable?

  • Is there a way to set an array's CurX value by some sort of "contains value?". I'm trying to check my inventory array to see if the item is already in the inventory, and if so, add to the quantity. If it's not in the inventory, add it to first "unassigned" array slot.

  • Slight update - its seeming to be that booleans do not pick instances, either. I didn't realize, but the event "MassiveScorpion is on-screen" was actually doing the picking; this is why it seemed to be working when multiple enemies weren't on the screen. The second I got rid of that, all of the events under them no longer worked.

    I'm totally confused, and not just in this specific instance, on instance picking in general.

  • Arima - actually not using else breaks most of the events. This is what I mean - it only seems to work for certain events.

  • Arima - nice tutorial. It helped a bit, but I'm still having issues when multiple enemies are on screen (however all of your advice helped when you DONT kill an enemy and get to the next one)

    Hm. As far as I can tell, I'm doing this right. Can anyone point out any visible issues?

  • Aphrodite - I completely understand that. That's why I'm baffled what I'm doing isn't working properly.

    Does it matter when the for each is taken into account? Should it be a sub-event of the instance pick, or with the instance pick event; above or below?

  • Roccinio, right - thats how I've been using my for each's, but I seem to find bugs every time.

    For instance, one of the issues I'm having right now:

    Player.Y < Enemy.InstanceVariable

    For Each Sprite

    DO THIS

    Else

    Player.Y >Enemy.InstanceVariable

    For Each Enemy

    DO THIS

    Since it's not actually picking each individual enemy instance, it requires a for each.

  • Has anyone actually figured out how this condition works? I know you use it for multiple instances of the same sprite, but it always seems to require hours of headaches moving "for each" to different events to see its effects.

    And even then, I'm still able to figure out a bug (ie. if you DONT kill the first enemy and move past him, the second one wont do what it's supposed to)

    All I've figured out is that when picking instances via instance variables/booleans, anytime you use Else, it disables the picking. Can anyone shed some insight on this? Thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Doc Ai - I actually was able to change every animation/anim frame aside from the default animation and have no problems as of yet. My capx is unfortunately too large to post, so I tried copy pasting the sprites into a new capx and changing them and they seemed to have worked. I'm assuming that means it's something with my code, but I have no idea what that is, so since I fixed 90% of the problem, I'm going to quit while I'm ahead . Thanks for your help!

  • Doc Ai - I did; changing the origin points actually did nothing (and I did drastic changes)