How do I set the Color of a Particle object to RGB or HEX without effects?

0 favourites
  • 14 posts
From the Asset Store
Particles support animations, collisions, effects and etc.
  • Hello!

    I decided to switch to Construct 2 for a bit, because that's the only thing with a Free MIDI Plugin, but I noticed it doesn't have a set color option.

    I'm looking for an addon (not an effect) so I can change the color of multiple particle objects. I'm not going to make separate objects for each particle to make different colors, because I set the color based on user input, with a html color picker plugin that I use.

    I've already looked at different ways, but none of them suite me, and the only color changing plugins & behaviors I've found so far are for sprites only, and I don't want to use effects (such as Tint), because I have 6 different particle objects, and free version limitations make it so I can only use 2 effects (sadly)

    Does anyone have any ideas?

    Thanks for all your answers and support all this way! 💖

  • Nope, but you can use multiples in a family.

  • Also, here is the C2 upload of what I have so far and the C3 upload of what I had, then decided to switch to C2.

    I like the C2 particles WAYY more, and decided to not switch back, but I have this obstacle.

    Also, Families are also restricted: I can't use them in the free version :/

  • dop2000 sorry if this pings you, but you usually have good answers. Any ideas?

  • I don't know if it's allowed in free version, but you can set a sprite to be emitted by particles. So all your particle objects can use the same sprite, and you can apply color-changing effect to the sprite. Or simply add animations/frames with different colors to the sprite.

  • How exactly can I do this? Also, thanks for the reply! (P.S. I'm using Construct 2) Also, I've added much more to my uploaded c2 one. I would appreciate it though, if there was a behavior or plugin to change the color (3rd party or not, I just want to get the job done), I don't know about the sprite method... It doesn't appear to be in the C2 particle manual, but is in the C3 one.

  • How exactly can I do this? Also, thanks for the reply! (P.S. I'm using Construct 2)

    Oh, that's a C3 feature.

    I think your best bet is to find someone to convert MIDI addon for C3, or find an alternative.

  • Yeah... Are you sure there's no way to change the color of particles? Like, 100% Sure? If there was a way to bypass the 2 effect limit, it would work flawlessly, but I'm not sure of any ways...

    Also, I have spent around 5 hours working on it, I think it's too far to go back 😅 Just finished adding a separate instance of an object for all 88 piano keys, and lined them up perfectly lol

    I don't care how I change the color, I just want to set the color in any way to the user input. I found a behavior that works on sprites, but doesn't appear to work on particles...

  • Honestly best you can easily do is add the tint effect to a layer where the particles are. Gotta work within free limits.

    Another idea to explore is a layer with a colored background and the particles with blend modes. But that honestly probably won’t work the same.

    If the particles object lets you load an image at runtime you could use js to modify the pixels of an image and load that. But you’d need to make a plug-in or do something hacky with the browser execjs action to do that. More trouble than it’s worth maybe.

    You could make a plug-in but construct’s renderer doesn’t provide a way to tint a texture. In theory you could hack the renderer to run arbitrary shaders there. But that’s absolutely not worth the trouble. We just wanted to tint an image, not redesign the entire engine renderer.

    Anyways you could probably try the first two. This was meant to give ideas to attempt. They may not work out.

  • Or you can make your own alternative to the Particles object by spawning a bunch of small sprites with different behaviors - rotate, bullet, sine etc. Randomize their parameters on creation.

  • Honestly best you can easily do is add the tint effect to a layer where the particles are. Gotta work within free limits.

    Another idea to explore is a layer with a colored background and the particles with blend modes. But that honestly probably won’t work the same.

    If the particles object lets you load an image at runtime you could use js to modify the pixels of an image and load that. But you’d need to make a plug-in or do something hacky with the browser execjs action to do that. More trouble than it’s worth maybe.

    You could make a plug-in but construct’s renderer doesn’t provide a way to tint a texture. In theory you could hack the renderer to run arbitrary shaders there. But that’s absolutely not worth the trouble. We just wanted to tint an image, not redesign the entire engine renderer.

    Anyways you could probably try the first two. This was meant to give ideas to attempt. They may not work out.

    Wow! I completely forgot about adding effects to layers! Thank you! I will take that into account!

    Or you can make your own alternative to the Particles object by spawning a bunch of small sprites with different behaviors - rotate, bullet, sine etc. Randomize their parameters on creation.

    This is another good idea, but I just found out something while trying to recolor a sprite with my plugin: It doesn't work at all. Do you know of any sprite recoloring things? If not, it's fine, and I'll work with what I have. Thanks A LOT for all of your help!

  • Also, Families are also restricted: I can't use them in the free version :/

    I guess I should have said containers.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Do you know of any sprite recoloring things?

    Just add a bunch of frames or animations - for each color.

  • I've gotten a long ways with all of your help, and just added more stuff to my uploaded C2 example, and I'm starting to get more familiar with Construct 2, and like it a lot more then C3 now (mostly).

    Now, I have one last thing to do to get it to work.

    I've seen blackhornet's Midi Plugin and indeed downloaded it, and it seems like it would be nice if it was updated a little bit later then 2014, after all, browsers didn't support MIDI back then. Last, but not least, I'm looking for a way to do what he did here, with the drag and drop a MIDI file, but (if possible) with a newer addon.

    Sorry for posting again, but I really am curious, and spent many hours on this. If anyone knows of a free plugin or something that can help me achieve this without much trouble.

    Thanks again!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)