this.currentFrameNumber not returning values

Fill this out this info to make it easier for the community to help you! If you don’t fill out this information, your post may be deleted or removed.

What Wick Editor Version are you using?
Candlestick 1.0.1, though this is in vanilla Wick as well. I’ve not tried @StickmanRed’s fork, though.

Describe the Problem
if (this.currentFrameNumber === 2)
{
//stuff
}
is a bit of code that doesn’t seem to return a value. I’m using an Update script on an oval made into a clip in a project that consists of a singular frame of length 2, with no empty frames.

What have you tried so far?
I’ve tried debugging it a bit to check if it’s the if specifically that seems broken, and it seems to be the case.

Do you have a Wick Editor File that we can see?
wickproblem.wick

1 Like

if that code is being placed in the oval clip, the “this” refers to the oval clip. and so if the clip only has one frame, nothing happens.

i cant verify right now but i think “project.currentFrameName” should be what you want, so it checks the project’s timeline instead.

(on mobile so i cant look at the project sry, just going off of what you wrote)

2 Likes

Oh wow… thank you SO MUCH