Reposting/reformatting as a stand-alone tutorial since it was in a topic that was deprecated
First, you have to understand that the normal code for a pen only draws every other frame . That’s because the When Is Pressed rule has a null frame before it will execute again. Meaning, it waits 1 frame before it will start over. That in turn means the Draw a Trail only runs at 30 FPS instead of 60 FPS
Here’s an example project I made a while back to demonstrate this “bug”
Twice the standard number of curves can be accomplished with 1 object (no clones) and only a simple modification of the usual pen code like this:
First, we add 2 rules so we get a variable that is set to 1 when the device is pressed and 0 when it isn’t pressed. The wait block is because the conditional rule doesn’t have the null frame of the When Pressed rule so the wait block keeps the 2 rules synchronized,
Then we add the usual When Is Tapped
Last, and here’s the key part, we modify the usual When Is Pressed so it doesn’t leave the rule until the device isn’t pressed. We do this with recursion (notice the custom ability refers to itself). The Check If just checks the Pressed variable and loops within the HDdraw custom ability instead of looping the When
Is Pressed rule. This avoids the null frame and lets the Draw a Trail run at 60 FPS
Here’s the HDdraw code in an example project:
Happy coding