Is it possible to use block coding for implementing the animations of a 2d characterbody? #399
Replies: 1 comment
-
I've tested and found 1 method that works that requires a keyboard (to hold ctrl while dragging). I used a simple scene tree with the Block Code node attached to the Sprite2D. Then I dragged a 2-by-2 sprite sheet that I drew into the texture property under the inspector. I also set the appropriate horizontal and vertical frames. I also made a Block Code script using the Sprite2D's frame property by both dragging it and dragging it while holding the ctrl key from the inspector. This method animated the sprite in my case, although it wasn't my first thought process. When I tried to use an animated texture and from it drag its frames property, the block wouldn't appear, probably because of some incomplete reference. I think that it would be possible to include an option to drag in blocks without holding ctrl for touch input devices. Also, it appears that Block Code overrides/replaces other scripts initially attached to the node. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi - just tried out block coding for a project and I saw that it was fairly intuitive. Just wanted to ask if there exists a way to implement sprite animations depending on the actions of the player?
Also, what would happen if there was a block code and a script attached to the same node?
Beta Was this translation helpful? Give feedback.
All reactions