Colludium's Forum Posts

  • Ashley - yes, of course, there's nothing in the console. Neither of the following do anything when called inside OnPropertyChanged():

    this.SetPropertyValue(id, 2);
    
    this._inst.SetPropertyValue(id, 2);
    

    If I add an undeclared variable inside the OnPropertyChanged(){} then that doesn't highlight an error in the console either - it's as if OnPropertyChanged is not being called. This is a behavior rather than a plugin - could that make a difference (no reason to think so, I expect)? The undeclared variable with no console error makes me suspect that this might be an editor bug, but I could be missing something hugely obvious...

  • Ashley - maybe I am misunderstanding this. If I enter the following:

    OnPropertyChanged(id, value)
    {
    	this.SetPropertyValue(id, 2);
    }

    Then nothing changes in the editor. In this example I was expecting the value to be clamped to "2". What am I missing? Thanks.

  • Great, thanks Ashley .

  • I'd like to use the OnPropertyChanged() function in instance.js to then clamp the properties values in the editor - how can I do this? Thanks.

  • Hi holi - yes indeed - all of my plugins are available on itch.io. Thanks for your interest in Twine!

  • Thank you Mikal Karentzos !!

  • Finally, Beta v1.0.0.0 is now available for sale at itch.io!!

  • OK,

    I've added a few features that allow you to edit the particle flags (behavior flag bits) after creation. I had to create my own methods in cpp, so that's why it's taken me a little while. But now you can do this (delayed setting color-mix flag ON):

  • Thank you all for your interest - it is really appreciated!

    I'm just doing some last cleaning up of the plugin - things like making sure that the event texts are consistent and appear logical.

    I've also got to tidy up the particle control events because the Liquidfun particle system is both powerful and complicated. Particles have behaviors that are set by binary flags, and the library supports changing these flags after particle creation. However, editing some flags makes no difference, as if the spawn flag settings are bound for the particle's life. No biggie, as long as it's understood and clear. I just need to make sure that the available events are correct!

    Once this is finished then the plugin will be ready for a beta release - sometime in the next week, I hope...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You're right about the is-overlapping condition - the overlap check doesn't interrogate the Physics library, it only uses the collision polygon. The on-collision trigger should call when box2d registers a contact between the bodies - if that's not working then it might be because you're moving the body using set position rather than by giving it a velocity or applying a force. Box2d doesn't handle that sort of movement input at all well, unfortunately.

    Physics will try to prevent the objects from overlapping. If you want the on-collision to register correctly then you could do something like:

    -Circle : Set Velocity : VelocityX = (Mouse.X - Circle.X) * factor

    VelocityY = (Mouse.Y - Circle.Y) * factor

    You'll need to experiment with the value of factor to get the effect you want.

  • It's not possible to tell what's going on from your description. Post up a link to a simple c3p file and we'll take a look.

  • Thanks for your interest, dragontattoo !

  • newt - ah, I see. Yes - the particle objects are just Sprite instances that have their position managed by the plugin, so you can do anything with them that you can do with a normal Sprite.

    On the first tick after particles are created in an action, the plugin creates the required number of sprites to draw their positions. If some particles are destroyed (by action or timeout) then the spare sprites are moved to outside the layout, in case they will be needed again later (practically no performance hit and there is an action to delete them).

    If you were to delete a sprite instance (by events or through other behavior like fade) then the plugin would just make another to ensure its particles are displayed.

  • Mikal - I tried the same demo with the particles as Elastic and it literally took 10 seconds to create the particle group. Although fun, I don't think it's viable, unfortunately!

    newt - yes, in a way. Liquidfun supports different particle types, each of which has its own set of behavior attributes. When testing, there were a couple that didn't seem to be any different to the Water type, so they have been ignored. In LFJS the following particle types are available:

    Rigid / Fluid - Rigid particle groups are ones whose shape does not change, even when they collide with other bodies.

    Water - Basic particle.

    Spring - Spring particles produce the effect of being attached to one another, as by a spring.

    Elastic - Elastic particles deform and may also bounce when they collide with rigid bodies.

    Viscous - Viscous particles exhibit clinginess or stickiness, like oil.

    Powder - Powder particles produce a scattering effect such as you might see with sand or dust.

    Tensile - Tensile particles are used to produce the effect of surface tension, or the taut curvature on the surface of a body of liquid.

    Pressure - Static pressure particles are subject to compression when pressure acts upon them.

    Repulsive - Repulsive particle groups repel each other.

    I've yet to add methods to allow you to change some of the attribute parameters, but it's on my TODO list.

    I realise that I need to add Color-Mixing to that list as well...

  • I realise that this is really a JavaScript question, but hopefully someone will be able to educate me about this.

    C3.Behaviors.Colludium_LFJS.Instance = class LFJSInstance extends C3.SDKBehaviorInstanceBase

    I'm looking to make my behavior plugin more modular (it's getting rather unwieldy). How do I extend the behavior instance class? I would like to move a bunch of functions into sub-classes / separate files but still have them accessible from the parent LFJSInstance 'this'. I realise that I don't understand ES6 yet, lol..

    Thanks in advance.