AllanR's Forum Posts

  • how many wingmen can there be? is there a minimum distance you want between wingmen?

    and the wingmen have to be anywhere on the red line?

    (it would be a lot easier to evenly distribute the wingmen on a circle around the cruiser)

    first I would have a variable named WingmanOffset to define how far out the box is from the cruiser.

    WingmanOffset = 40 (each side of the square will be 2 x the offset)

    then choose which line of the box the wingman is on (Top, Bottom, Left, Right), and pick a random point on that line.

    if Top then Y = -WingmanOffset, X=random(2 x WingmanOffset) - WingmanOffset

    if Bottom then Y = WingmanOffset, X=random(2 x WingmanOffset) - WingmanOffset

    if Left then X = -WingmanOffset, Y=random(2 x WingmanOffset) - WingmanOffset

    if Right then X = WingmanOffset, Y=random(2 x WingmanOffset) - WingmanOffset

    EDIT: I should have refreshed! :) NOAH is right, the other advantage of a circle is that you can space the wingmen an equal number of degrees apart.

  • was there supposed to be another picture?

  • thanks! I knew I had done something very similar recently that didn't have any lag - I must have done what you did in that example. I knew there was a lag if you pinned something to another object that was pinned to something else, but thought if you manually positioned the second object it might avoid that issue.

    now I know - either pin everything to the same object, or manually position if there is a hierarchy.

  • just tried it out, and unpinning a knob on the start of a drag will also solve the timing issue.

    whenever you move the panel by drag and drop, or manually changing its position, pin the knobs to the panel first. And only unpin when you start to drag a knob (or when you update the knob position when an object it selected).

  • at first I was setting the knobs to the slider every tick like that, but as you dragged the panel around there was a slight lag that didn't look very good.

    so that is why I pinned the knobs to the panel at the start of a drag, and unpinned them on a drop.

    Alon, to solve the first problem, before you move the panel, pin the knobs to the panel. Then on Knob drag start, unpin the knob.

    by changing the wait from 0.25 to 0.1 is making it wait less time, not more! try 0.5 seconds.

    also, making the panel invisible does not disable it - you can still drag and drop it, and the sliders will still work if you happen to click on one. it is better to move it off screen if you want to hide it.

  • trigger once was my first idea too, so I tried it, and it doesn't reset until the unicornPoints variable goes down to a value below what triggers the condition. There wasn't enough code shown to know if that ever happens, so I didn't mention it...

    I thought that maybe just changing the variable to a new value would reset it, but it didn't.

  • I couldn't open the file because it said it needed the AlphaMask and InverseChromakey effects.

    I think you might have to upload those to Addons & Extensions

  • you can add that code to the place where you increase unicornPoints, that way the code only runs when the point gets added.

    the other option is to use another variable as a flag. When you increase unicornPoints, set the flag to 1.

    then change your code to say:

    System flag = 1 -> then set candyRandomizer to random(4), and flag = 0

    then the code wont run again until flag is 1 again.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I took your file and made it work - I added a couple of extra sliders so you can see how to associate a knob with a specific slider (I gave the sliders and knobs an instance variable called sliderName, and set the name to the effect name that it should control).

    when dragging the panel, I pin the knobs to the panel. When the panel is dropped, I unpin them.

    this file does not use a "shield" so notice how you can move the panel over an object and then click on the panel to start moving it again and if the mouse is also over the object, that click also happens...

    https://www.rieperts.com/games/forum/slider_knob.c3p

  • to REVERT back to a previous release: you have to download a copy and unzip the whole project, look for a file called project.c3proj and open that in a text editor, and on the second line of the file you will see:

    "savedWithRelease": 16800, (or whatever version you are currently using)

    change the number to the version you want to open it with... for example, to go back to R163:

    "savedWithRelease": 16300,

    save the file, re-zip the whole thing (and change the extension to .c3p)

    NOTE!!!! this will only work if you have not started using new features not found in the version you are going back to... so make sure you keep lots of backups! and use at your own risk :)

  • like newt said, yes C3 works well on all those platforms, and C3 is great to quickly prototype something.

    but for any kind of app that will be used by many users, you will need a backend system that has the capacity to handle the traffic - that would have to be developed in something else.

    and there are security issues. privacy issues. etc.

    C3 does not have native push notification support - which will probably be a problem for you. And C3 doesn't use native UI elements the way your users might expect - you have to replicate that yourself, which can be quite difficult. It all depends on what you have in mind.

  • here is a pixelated google webfont:

    https://fonts.google.com/specimen/VT323

    you can change the project's "Sampling" setting under Project Properties. That is the only way I know to change smoothing... but it effects all the graphics on the canvas.

  • take another look at dop's example. on event 4 it sets the slider's instance variable "Value" that you can then assign to your object's effect properties.

    event 5 does the opposite - its sets the "Value" variable, and then updates the slider to represent that value - exactly what you want to do!

  • not that I know of. Are you trying to get a pixelalted look?

    you could try a webfont for the text object...

  • ok, just took another look at your original file and saw that the origin is in the middle of Slider...

    normally I would set it at 0,0 to make working with it a little easier...

    so that would change the clamp statement to:

    knob - set X to Clamp(self.X, Slider.X - Slider.Width/2 +10, Slider.X + Slider.Width/2 -10)

    (and adjust the +10 and -10 as necessary) - although image points are better, because if you scale the slider at all, then the image points will scale properly as well...