Arima's Recent Forum Activity

  • There's actually a simpler method to fake reducing the framerate. Set the 'clear background' property to no, then add to a variable 1 each tick. When the variable is above the desired threshold (5 for example to make the effect obvious), make all the layers visible for one tick.

    Every tick

    • add 1 to variable

    If variable = 5

    • make all layers visible
    • set variable to 0

    Else

    • make all layers invisible

    Using this method, you don't have to recode anything, but this will only work on platforms that don't automatically clear the screen regardless of c2's setting, though (I seem to recall there is a platform that ignores it), and needs the background to be completely obscured otherwise you'll get smearing effects.

    Also, jayderyu - don't use a condition checking if a variable equals a float/decimal - use integers instead. Because of rounding errors, floats cannot be relied on to be exact, they are very often off by a tiny amount and so the condition won't run.

  • Awesome, it works perfectly now. Thanks!

  • Well, I tried, but I can't get it to work. Can you tell me what I'm doing wrong? All I get returned is 0. Capx.

    Also, it would help if you added that formula to the description of the expression. Though, I think it would be a lot more intuitive if it were something like array.at(x location of pixel, y location of pixel, 0-3 representing r,g,b,a).

  • You could also save all the uids into an array, and if you wanted then store the array with a 'tag' in a hash table.

  • Why are you asking on the construct forum how to use unity? You should ask on their forums instead. They'll be able to help you much better.

  • Awesome, thanks!

  • I've discovered that the canvas.red/green/blue/alphaat expressions are very slow. I tried loading all of the image data into an array (which for a 500x750 image took like 15 minutes!) and discovered retrieving values from an array is far, far faster.

    Is there any way that those expressions could be sped up? I know I don't understand how the plugin works behind the scenes, but could the plugin store the image data in an array in addition to or instead of the method it currently uses? Or perhaps could it export the r,g,b and a values as an array to json that could be loaded by the array plugin?

    Edit: whoops, it does have to array as json. There seems to be a conflict though, as there are two asJSON expressions (one in the misc category and one in the canvas category), and the second one doesn't seem to be working.

    Edit 2: I renamed the expression in the plugin and it doesn't seem to work. The debugger says the array is holding [object Object]. Can you explain how to use it? It said something in the js about that expression being experimental - or maybe I screwed it up by renaming it. If you could get it working or explain how it works, it would be much appreciated! :)

  • You do not have permission to view this post

  • BluePhaze Check your PMs.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could just use a global variable instead. Have all audio code in each place be a subevent of an event with the condition if audio_on = 1. Setting it to 0 deactivates it everywhere with one action.

  • Don't create the same thread repeatedly. You said the same thing a week ago.

  • Yeah, that's the main reason loot pursuit has taken so long to make. I just can't work on it much. :(

Arima's avatar

Arima

Member since 11 Jun, 2007

None one is following Arima yet!

Connect with Arima

Trophy Case

  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Email Verified

Progress

19/44
How to earn trophies