sgn15's Recent Forum Activity

  • hmm, I thought the ForEach condition was meant to make the specified object's multiple instances to act independently from other. I thought my code meant that even if there is a situation wherein all instances are in Attack anim 2nd frame, they would still fire just 1 bullet each.

    Anyway, I tried disabling the Foreach (but still with trigger once), each enemy only shoots 1 bullet. I'm not sure if this really fixes the problem, but the hitbox (spawned by each bullet and pinned to the bullet that spawned it) is only pinning for 1 enemy's bullets. I think this might be related to the original problem. Still trying different stuffs at the moment.

  • +Enemy: animation "Attack" is playing

    +Enemy: frame = 2

    +ForEach Enemy

    +Trigger Once

    -> Spawn bullet

    Only 1 instance of enemy is shooting one bullet per Attack Animation 2nd frame. The other enemy instances are all shooting 8-10 bullets each time they go into "Attack" anim 2nd frame.

    I already tried putting "Trigger once" before the foreach. It doesn't work still.

  • wait, I store the UID of the bullet to the enemy's instance variable? Did I get that correctly?

    Well, there are many instances of the same gunman object enemy at the same time, so that's why I need to know the specific bullet shot by each enemy. Is what you said correct for my situation?

  • How can I select the specific bullet object (with bullet behavior) that my enemy object spawns?

    SYSTEM: Pick by comparison: Pick Bullet object where Bullet.UID = what?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm aware of the jpeg effect on sprites. I also checked the RGB values of the pixels not being recolored. They are the same as the pixels being recolored.

    I just checked my tolerance. It is indeed 1. I read the description of tolerance parameter and it says its value is from 0 -100, so I tried different values. The higher the value (say 100), it affects the other colors not specified as well. So the best possible value I tried that didn't recolor the colors not specified was 30. It still doesn't recolor some pixels (only sometimes).

    Basically, I keep moving my player (walking, jumping, etc.) in my platform game. Sometimes all red are recolored, sometimes there are pixels left not replaced. I think this is either it can't keep up with something graphics related just for my computer (I'm not familiar with WebGL and what could possibly affect it) or it is really a bug.

    What do you think?

  • ok. thanks. I fixed it.

    There's something weird happening. Isn't a replace color supposed to replace all parts of the said color into the new color? there are some pixels of that said color not being replaced. I went into the image editor to check the RGB values of the color parts not being replaced and their RGB values are the same as the ones I put in the event.

    Any idea on this issue?

  • http://oi59.tinypic.com/10mmzok.jpg

    The problem still persists.

    combining the 2 events into 1 event results in the same problem (only light red is being replaced).

  • Ok. I understood the logic of what you posted in that thread, but not the loopindex/tokenat, etc. I only want to do it (replace color) at the start of the layout without a function. Is there something wrong with my code? I don't understand why only the 2nd event is working. I also tried putting them all in one event, the 2nd set of replace color is still only working.

  • Ok. It worked! but only 1 color replace is allowed per layout? only the 2nd event works. If I remove the 2nd event, the 1st event works. If I replace the first event's condition to Every Tick, only 1st event works.

    http://oi58.tinypic.com/hs83l1.jpg

    I need both events to work. How can I fix it?

  • >

    > For exemple, to change white to black, you'd have to have:

    > parameter 0 = 255

    > parameter 1 = 255

    > parameter 2 = 255

    > parameter 3 = 0

    > parameter 4 = 0

    > parameter 5 = 0

    >

    > The parameter 6 changes the tolerence, I let it to 1 personnally, basically, it indicate to change also colors close to the one you have chosen

    >

    > When the effect is applied, you don't need to set it continuously, however, it is a webGL effect, and will not be visible everywhere, also, change color is kind of an intensive effect (since it has to check the colors of the picture), so I recommand having something to back it up in case it doesn't work on some computer, or if you want the user to turn it off

    > (the system expression Effects are supported will help you supporting configurations without webGL)

    >

    I kind of got lost there. Can you answer these questions.

    1. Can you explain if I need to set all 7 parameters (through events) if I only need to recolor the red parts of my character sprite?

    I did this:

    +On start of layout

    ->Enable Replace Color

    ->Set effect Replace Color index 3 to 0 (don't know what this means, just experimenting)

    doesn't change any color

    2. About the support of WebGL, it's supposed to work in browser preview, right?

    3. I kind of did not understand what you meant by "system expression Effects"

    https://www.scirra.com/manual/126/system-expressions

    I did not saw "Effect/s" in that link?

  • I will try now using events. I tried replace color properties yesterday.

    can you tell me what do I need to put in the parameter index for replace color? and do I need to trigger the replace color continuously or just once (like start of layout) ?

  • not sure I understood you.

    I'll replace the generic condition and action names with a new example using sort of pseudocode:

    +Enemy is alive

    +Enemy is on ground

    +Enemy is not attacking

    +Enemy is near player

    + 1 out of 4 chances or 25% chance of happening

    ->Attack

    so assuming the first 4 conditions are always true, the enemy won't attack every time those 4 conditions are true. Instead, the enemy will attack if those 4 conditions are true AND randomly (randomly would have to be configurable like X out of Y chances or in percentage).

sgn15's avatar

sgn15

Member since 20 Sep, 2013

None one is following sgn15 yet!

Trophy Case

  • 11-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Email Verified

Progress

14/44
How to earn trophies