ome6a1717's Forum Posts

  • eli0s - I figured out the collision issue. It was a mistake on my part (I was multiplying the size of the death animation by a variable set on the ROCK's creation event and some of them were accidentally set to 0 )

    I've tried a for each in the event list and it still doesn't seem to play nice when 2 on-screen are playing the same frames. Like I said, if I offset the frame, it's fine. I'm more curious on why it's happening.

  • Aphrodite - nevermind; just realized the same thing should work for that, as well. Thanks again!

    EDIT - I was wrong - upon further investigation, it still has the same issue where the sprites aren't being created. I'm wondering if it can't decipher which location to create the sprite? (I'm creating it at the ROCK.X, so I'm guessing since 2 hit simultaneously, it only chooses one of them?)

  • Aphrodite - thanks! I completely forgot about the spawn object on the sprite action list!

    What about something like the enemy playing the shoot animation?

  • I've had an issue for a while that I normally found a work-around for, but I'm still rather curious; When I have an event such as :

    if ROCK on collision with FLOOR

    Create ROCK death sprite

    Destroy ROCK

    It doesn't seem to work right if 2 rocks hit the floor at the same time (it will destroy both of them, but it won't create a rock death sprite on both). I've noticed this on other occasions as well:

    if ENEMY is playing animation "Shoot" and = frame 3

    Create Projectile

    If 2 enemies are on screen, playing the animation simultaneously, only one will shoot (usually the first on screen). However if I offset the animation by 1 frame, both shoot the projectile fine.

    I'm just trying to wrap my head around why this is happening.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • BluePhaze,

    I'm sorry, but it seems incredibly silly to make something like a menu or interactive controls that will be used on every layout, and instead of using #Includes, copy/paste the events to 100+ event sheets.

  • Roccinio - the reason I don't want to do that is if I want to change something that happens in all 100 of those levels, I would have to change the event 100 times...for each time I wanted to change it (sometimes I can't make up my mind!)

  • DAG Yes - all of my layouts are using a "Main" event sheet, and then subsequent event sheets for the specifics levels.

    Roccinio - the thing is, I don't want the global variable to change. It widely affects other events, and switching it to 1 when changing the layout will ultimately re-trigger the event anyway when switching it back to 0.

  • Everytime I go to another layout while having an event such as:

    If GlobalVariable1 = 0)

    Destroy the world

    Every time the layout switches, it rechecks to see if this variable is 0 (and if it is, it destroys the world...again). Is there a way to avoid something like this?

  • - I can, I'm just trying to simplify my code instead of going through and finding each time something like this is created (which happens on multiple separate events/sheets)

    ikke2902 - I think I see what you're saying. I'll give it a shot.

    Thanks everyone.

  • Doc Ai - it's too large too post, this is the best I can do :

    If this were to work, this is what I would be trying to do.

  • ikke2902 - Hmm, it was a good idea, but it's not working for what I need it to do.

    In order to save hundreds of lines of code, I need to check if a variable is = to something, and if so, when "sprite1" is created, create an additional sprite on top of it. I tried using what you did, ikke, but it only worked for the first sprite created until all of them were destroyed (I needed to add a trigger once to the variable check). I tried taking away the trigger once and it worked, but instead created the new sprite every tick which isn't what I want, either.

    I'm quite stumped on this one.

  • I'm noticing that when doing an "On Created" event, it's not actually picking that specific instance. Is there a way to do this?

  • Ashley

    KFC

    Perfect. I will have to do some research. Thanks!

  • Ashley

    If you scroll to 1:00 or so, how would we do something like this, then? (and btw, this is an example from the game you referenced in the "remember not to waste your memory" blog)

  • eli0s - ah good find! I thought it was during the move, so I tried the wait action AFTER the set animation, which obviously didn't work. Thanks!