Hey, I’ve just got into coding with Wick Editor 1.18, and I’m finding 0 tutorials on youtube and or forum topics discussing on how to accomplish this, but I have no clue on how to give a character animations for doing something. I don’t know how the clip system works, so I’d love some help.
Hey!
You can create a clip, put a stop animation in the first frame, and draw other frames, for example, a crouch.
(Name the first frame of the crouch animation “crouch”, and the idle frame “idle”)
Then, you can put this:
if (isKeyDown(“down”)) {
[YOUR CLIP NAME].gotoAndStop(“crouch”)
}
if (!isKeyDown(“down”)) {
[YOUR CLIP NAME].gotoAndStop(“idle”)
}
What this does, is that:
In here, if the arrow key “down” is pressed, it goes to the frame crouch.
In here, if you’re NOT pressing down, it goes to the idle animation.
crouch and idle1-3-2021_7-08-13PM.wick (5.6 KB)
Here’s an example.
Does that help?
Or do you mean by having it animated and also with some code?
If that’s the case, you can code something while the clip is running.
That will help so much in the future. Tysm!
but this issue is, can I create multiple animations for one clip or is that the most basic thing with the gotoAndPlay thing?
You could make a clip inside a clip, so it would be multiple animations at once, right?
Also, what do you mean it’s the most basic thing with the gotoAndPlay thing?
as in with a single clip, I can create various animations just starting on different frames and stopping on the other, yet looping around
Here is a tutorial playlist! (made by the co-creator of wick)
Also welcome to the forums
hey, I tried to use your example in an update script, I used:
if (key === “s”) {
Blobby.gotoAndPlay(11);
}
if (!isKeyDown(“s”)) {
Blobby.gotoAndPlay(1);
}
and well, it didn’t work. It’s mainly to whenever I hold down S it goes down, yet, it doesn’t work.
You put gotoAndPLAY, that plays the animation.
Put gotoAndStop and see if it works.
Also, why did you put key === in the first one but in the second one you put! isKeyDown?
Also…
You can loop a clip if you put various frames, and in the frame you want the animation to loop, you can put in default "gotoAndPlay(“1”);)
uh, it’s weird, I just prefer === as the way to move characters but can you tell me if it’s more professional to use isKeydown?
Welp, key === checks what last key pressed was, but isKeyDown checks if the key is down, i don’t really know which is better…
if you press “a” somewhere in the program and you check if “key === ‘a’” later in the project, it will return true. if you instead check if “isKeyDown(‘a’)” later in the project, it will return false. that’s because “a” was the last key pressed, but it isn’t currently pressed.
Here’s a gotoAndPlay() example
Here’s a gotoAndStop() example
Like @sporklpony mentioned, there’s a good amount of tutorials on the wick editor site:
And you can also use the search button on the forums to look for questions and answers