Depthcharge's Forum Posts

  • 5 posts
  • I am having difficulty getting the plugin to work. I inserted one of these objects into my layout but now when I run my layout the following error occurs:

    Javascript error!

    TypeError: ctx is null

    localhost/Square_plugin.js, line 62 (col undefined)

    This is either a bug in Construct 2 or a problem in a third party plugin or behavior - please report it to the developer!

    I'm pretty new to Javascript so I could use some help

  • Sorry for the long delay. I haven't had as much time to work on this as I would have liked.

    Taking some of your suggestions I have worked up a simple example project that simulates in a very simple way the mixing of colored liquids.

    Example file: dropbox.com/s/xodgrvqxeq9k2jr/TestFillRGB.capx

    The buttons at the bottom are click and hold. I left a lot of my debugging output in place so you can track what is going on. There are also more variables being used than are strictly necessary but I did this on purpose to make the example more understandable (I hope).   <img src="smileys/smiley2.gif" border="0" align="middle" />

    If anyone has any questions, comments, or constructive criticisms I welcome them! Next up I will be trying to add density and opacity to my liquids. Stay tuned!

  • Thanks for all the replies!

    I'm putting the Tint effect to work for me now and I've started working on the problem of gradually changing the color of my liquid object as new colors are added but, alas, it got late and I had a long day at work so my head is getting kinda fuzzy. I'll be back tomorrow night with a status update and if all goes well a sample of my progress.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Create a white sprite and use the tint effect. Store the RGB values in variables and use them to read/write the colours.

    This was much easier than trying to use the AdjustHSL effect and seems to be giving me the control over the colors that I was looking for. Thanks!

  • Hello all! I have run smack into a roadblock trying to create my first Construct2 project and I was hoping someone out there could guide me to a solution.

    My Goal:

    I am trying to create a basic simulation where you have a cup with a liquid of a known color (Color A) and you are pouring a second liquid of a different known color (Color B) into the cup. What I hope to achieve here is turning the liquid in the cup into a new color (Color C) which would be the interpolated mid-point of Color A and Color B.

    My Problem:

    The full scale of my project will include dozens of different liquids and you could combine any number of them into the cup in a given round so creating sprite animations of the color shift for every combination of liquids is far from ideal if not all together impossible.

    I understand that a sprite object doesn't exactly have a color of its own and therefore I can't just set read and set the RGB/HSL values of a sprite object the way I'd like. Can anyone suggest a good way to approach this?

    Thanks in advance,

    -Mike

  • 5 posts