My advice would be to download other "gun" scenes to see how other people have done it. I am not suggesting that you COPY and PASTE other people's scenes, only to get ideas from them. There are thousands of gun scenes in the Algodoo archive.
Generally, you can write anything you want to in comments except that you cannot break the rules by using cuss words, threats, and those sorts of things.
Thanks for asking!
Xray, Algodoo Admin
By the way, I looked at your scene and it is NOT a gun! It is more like a crankshaft and piston for an engine. Anyone playing your scene will probably laugh at your "gun" so I suggest again that you look and see how others make guns to get some ideas.
When I looked over Ky13harbor9's script, I see that he uses underscore characters in his comments in place of space characters. For example, "THIS IS A COMMENT;" would cause an exception, but "THIS_IS_A_COMMENT;" would not.
I believe that's because Algodoo assumes that your comment is actually the name of a variable or a function, and those types of names cannot have space characters separating the words. So, we get around that by using underscore characters instead.
Why do you even bother to make nonsense scenes like this one? Why not make a scene that you can be proud of? Even a simple marble race or some sort of game would be much better than just hacking up a bunch of junk that falls into a pile.
Your note next to the final gear in the train says "This red gear will turn 1 time for every 10 googol turns of the motor!"
Well, I don't believe it! The reason is because the torque loss through the series of gears will be so great well before it reaches the final gear, that there won't be enough torque available to rotate it. And even if there was enough torque, no one would be around to witness the turn because it would require more time than there is during the lifetime of the Universe, let alone the lifetime of a human!
Because it could mean sustain, suspend, suspicion, suspense and a lot of other words that begin with sus. Why would anyone assume that it means suspicious?
And besides that, why would someone write "when u sus"??? That makes no sense because it's not a complete English sentence? You kids need to learn proper English grammar!
Nice job on the animation! I was going to make some suggestions in your previous scene for how to do the arrows and animation but I see that you figured it out by yourself. Excellent!
Quote: "Is there a way to delete a custom variable (_variable = 0;) from an object?"
Unfortunately, no. I have wished for such a thing many years ago but it just was not included in any of the Algodoo updates.
Here is what I sometimes will do with a local (custom) variable that I no longer need. I write "not used" (include quotes) in the variable data area. In some cases I might have 5 or more variables with "not used" in their data areas! That will remind me at a later date which variables are no longer used. If you simply give them a zero value (_var = 0) then you might forget later whether a variable is still used or not.
e.other.density = 0 causes issues with Algodoo memory, and so it's better to use e.other.timeToLive = 0.
Interesting scene! In case you did not know, it also works with polygons and other shapes. Drop a rope into it (for example) and multiple boxes come popping out!
Nice job on the Excavator! There is one issue that causes problems you should know about, and that is each movement of the hydraulic rams have no limits. In other words, the moveable parts will continue moving to the point where either the hydraulic ram or other components of the excavator will become damaged. If you want to fix that, then I suggest that you place limits on each movement of the hydraulics. Except for that issue, it works great!