Wick Editor bugs and crash procedures

Article topic:
Wick Editor bugs and crash procedures

Items will be ordered like this:
7. [issue]
[description]
Followed by the replication method, if needed:

  • [step 1]
  • [step 2]
  • [step 3]

Alright.

I’ve been using the wick editor for some weeks now, and I’ve got to say that its very cool. It definitely curbed my Scratch addiction (hah) and I’ve started using it more. However, the editor will crash under certain, very easy to hit, parameters:

  1. Green error screen.
    Dragging a frame to a layer that does not exist. I did not get this every time, but this usually works with audio files over thirty seconds. I do this accidentally a lot.

  2. random.integer reference not working how “intended?”
    I attempted to execute the following code:
    playSound(random.integer(1, 10))
    This will result in an error message. Is it not possible to play a random sound?

  3. gotoAndPlay then stopping crashes
    Executing this code crashes the editor:
    gotoAndPlay(1)
    stop(1)

I have access to a windows computer, but I mainly use this program on ChromeOS + Chrome Browser. I have not tried replicating these bugs on another browser or OS.

OS: ChromeOS (Chromebook)
Device Type: Desktop
Browser: Chrome

That is all.

Nice editor by the way, guys.

Welcome to the community:

random.integer will return a value from 1 to 10, but then your are putting that number from 1 to 10 into the playSound function which is the problem… the playSound function only accept the string of the audio file that you want to play.

Don’t do this, just do gotoAndStop(1);

Thanks for both of your answers. I didn’t realize that they worked in a slightly different way.

Hi @RetroPresto, welcome to the forums!
I’m glad you enjoy the editor and sure you’ll create some great things in it too!

Here’s how I would do it:

var audioAssets = ["name_of_audio1.mp3","name_of_audio2.mp3","etc.mp3"];
playSound(random.choice(audioAssets));
// Read warning below

Warning: Don’t put this code inside of the update script unless if you add a condition to it
Example: if(condition){ /* code goes after this */ }
Note: You’ll need to adjust the audioAssets array so that it includes the names of the audio files in your library.

1 Like

one important thing about scratch that is different from wick (if i remember correctly) is that scratch intentionally slows down code so that it is easier to animate. for example, “repeat” loops are slowed down from running as fast as it can to running 30 times per second.

this is important because in scratch, the “forever” loop is used in many situations, but you can’t just say “while(true) {}” in wick and expect the same thing. you might expect it to run once every frame like in scratch, but “real” code actually has to run every script in a single frame (which isn’t possible if your while(true) never ends) and your editor freezes. instead, use the “update” tab to run once every frame.

2 Likes

I do know that Scratch is capped at 30 FPS, however wick can be set to custom. I understand where you are coming from as in running all the code once per frame. I’m so used to Scratch and gotta get adjusted to wick. A notable difference is that this software is also ready for animation as well as more basic games which is something I can appreciate. This is a nice editor and I’ve been using it waaaay more than Scratch for my animations. With Scratch, I’d have to upscale the canvas with a Scratch mod so it would look decent on YouTube. I’m glad I can animate at whatever quality I want.