On/Off Radius Plug-in Idea.

This forum is currently in read-only mode.
  • <img src="http://img821.imageshack.us/img821/5893/radiaspluginideaconcept.png">

    What I had in mind for a cool and useful plug-in or feature. A big circle cut into rings, where if a object is within this ring, it increases this variable. The further in, the bigger the number. Here are some attributes for it as well:

    MinVariableNum: The smallest number allowed for variable scaling.

    MaxVariableNum: The largest number allowed for variable scaling. Is also Base Variable

    GeneratedRings: The total rings the circle can be cut into. Limited at 50.

    GeneratedSize: Scalable in the layout editor, this just tells you how big it is right now, and can be edited here as well.

    This is just an idea/Concept. I don't know if there is something like this already, but if there is, tell me.

  • there's no plugin, but you can do it with a formula:

    clamp(((floor(lerp(('maxnumber')-('minnumber'),0,distance(radiussprite.x,radiussprite.y,othersprite.x,othersprite.y)/(radiussprite.width/2))/('numberofcircles'))+1)*('numberofcircles'))+('minnumber'),('minnumber'),('maxnumber'))

    here's an example cap:

    http://dl.dropbox.com/u/1013446/bulls.cap

    if you can't load it, get the latest version of construct here:

    http://www.scirra.com/forum/viewtopic.php?f=2&t=7119&start=0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeap, distance(x1,y1,x2,y2), or the distance between two points, is one of the more useful expressions.

  • there's no plugin, but you can do it with a formula:

    clamp(((floor(lerp(('maxnumber')-('minnumber'),0,distance(radiussprite.x,radiussprite.y,othersprite.x,othersprite.y)/(radiussprite.width/2))/('numberofcircles'))+1)*('numberofcircles'))+('minnumber'),('minnumber'),('maxnumber'))

    here's an example cap:

    http://dl.dropbox.com/u/1013446/bulls.cap

    if you can't load it, get the latest version of construct here:

    http://www.scirra.com/forum/viewtopic.php?f=2&t=7119&start=0

    Thanks for the example, lucid. But there was one problem: The minnumber was set to 10, meaning if you were outside of the radius, the variables would still go down by 10. Setting it back to 0 fixes the problem.

    (My main intention for this was to make a explosion splash damage thing. Thanks BTW. )

  • instead of lerp you can also use cubic or qarp for a non linear fall off curve

  • > there's no plugin, but you can do it with a formula:

    > clamp(((floor(lerp(('maxnumber')-('minnumber'),0,distance(radiussprite.x,radiussprite.y,othersprite.x,othersprite.y)/(radiussprite.width/2))/('numberofcircles'))+1)*('numberofcircles'))+('minnumber'),('minnumber'),('maxnumber'))

    >

    > here's an example cap:

    > http://dl.dropbox.com/u/1013446/bulls.cap

    >

    > if you can't load it, get the latest version of construct here:

    > http://www.scirra.com/forum/viewtopic.php?f=2&t=7119&start=0

    >

    Thanks for the example, lucid. But there was one problem: The minnumber was set to 10, meaning if you were outside of the radius, the variables would still go down by 10. Setting it back to 0 fixes the problem.

    (My main intention for this was to make a explosion splash damage thing. Thanks BTW. )

    yeah, I thought minnumber was supposed to be the very min number even for outside. at the last minute I thought you many have meant min within the circle, but I figured you'd just change it like you did if that was the case

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