You can put as many keys.isDown() statements as you like in postSetp and in update. Just make sure to place a semicolon between the scripts which separates them.
Just be ready to add the additional script immediately after you type the semicolun! If you attempt to type the semicolon and then add nothing else until later, it won't allow you to do that. So, highlight and then COPY the script (Ctrl-X) which will also delete it from update. Then point your cursor to the right of the next-to-last bracket in postStep (The last bracket is for the (e)=>{}) and type the semicolon. Then before you do anything else, press Ctrl-V (paste) which will paste the added script to the right of the added semicolon. Thyme is very sensitive to the sequence of how you place new code in existing code.
I don't understand. Please explain what you mean by "work on the same". The same what? If you can describe what you want to do in detail, I'm sure that I can figure out a script that will work for you.
Why don't you finish your sentence? "What will happen if .....yady yady yady yady yady yah?" Then people will understand what it is you are asking about!
Oh, that's okay. It's YOUR scene, so do what you want with it.
Suggestion: Put some fur on him. All little creatures look a lot cuter when they have fur!
It works for me, so you are obviously not doing something correctly. But I cannot help you unless you can explain in DETAIL exactly what you are doing, and at what point it fails.
Did you try to copy my script from an earlier comment, and paste it into the postStep section in your scene? If you copy/paste correctly, then you will see that it does in fact work!
timeToLive is too short for Ellipse to be of any use. So, the user has to know to set ttl to +inf or some other large value, after his/her Ellipse has been created. OR you create a button or key-stroke that will automatically "set" the ttl after a new Ellipse has been created. OR, set the ttl when Algodoo stops running (that might be the best approach).
Before it gets deleted???? Are you kidding? This is one of the greatest scenes that were ever posted here on Algobox!
But, yeah.... all kidding aside, I will probably delete it soon before that kind, thoughtful, and friendly Admin sees it. (um, what's his name again????). He will probably want to give me an award for such a clever and technically complex scene.
One way is to find a texture. Something like one of these: Furry Animals
Then add one of them to the creature in your scene. Like magic, your cute little creature will have FUR!
If you would like to see an example of what can be done, I could make a simple scene and post it just long enough for you to see it and copy what you want from it. Then I will delete it so that you can take credit for it.
Let me know if you would like me to do that?
In case you did not know, the correct way to spell the word is "SIX". If you change the spelling from "sex" to "six" then people won't question it.
If you don't know how to edit the description, let me know and I could do it for you if you would like me to. I am the Algodoo Admin, and I have the ability to edit or delete any scene.
When I first downloaded this scene and read the instructions, I thought to myself, "So, what's the big deal about using an axle to rotate an object? That's easy to do without s_noonan's clever and mysterious scripting!" But I soon realized that the axle isn't rotating the geometry. It's rotating the TEXTURE!
Okay, it is very clever and interesting to rotate a texture with an axle, but how useful is that for other users? I mean, other than s_noonan saying, "look what I was able to do", does it have any good utility for other users? I can rotate a texture with the texture tool already!
This is impossible! That rope thing which holds the water keeps breaking.
Have you been able to do it without breaking the water rope (or whatever it's called)?
It's very cute now! In fact, I want to take it home and cuddle it!
By the way, I noticed that you did not put fur on its head, and so I did that on my own copy of the scene, and it's even cuter than with fur on just its body! I used your white fur texture, and it looks great!
I discovered an interesting effect while playing around with this. Place the axle in the center of the picture, and then engage the mechanical rotation so that the geometry rotates slowly in the opposite direction that the texture is rotating (make sure to unglue the geometry from the background). You can tweak the rotation speed and get some cool effects. This is especially interesting if you replace the Mona Lisa texture with something else such as a spiral or a propeller image.
It doesn't work because every e.this.vel = [0,0] forces the velocity to be zero even though you are commanding it to move with a e.this.vel = [-4, 0] script in some other area. One simple way to get around that is to put each IF statement in the FALSE section of the previous IF statement, like this:
If this thing is true ? {then do this}:{otherwise, if this other thing is true ? {then do this}:{otherwise, if this other thing is true ?}: {etc.....} Then the last false condition would be to stop the object from moving.
So, for this actual scene, the code would look like this:
I know the legs are rather strange. That's because I whipped the whole thing out in just a few minutes. I can usually do a better job if I take my time.
Now that you have taken a look at my scene (which is mostly a copy of yours) do you want me to delete it? I won't mind at all if you say yes, because I made the scene only for you because you asked me to make it!
realHI -- Wow, nice job of calculating the number of Hillary's lies and deceptions. It was already at 1.73 times e to the googolplex power, but with the help of Trump's wall, the HillaryMouthBlabberForce power will be reduced to the size of less than one wavelength of ultraviolet light. Then when Trump wins the Presidency, the people of New York will celebrate by topping their ice cream with red, white, and blue sprinkles.
There are a lot of Etch-A-Sketch scenes on Algobox, but, in my opinion, this is the best one. By "best" I mean most accurate, most stable, and most robust.
Good job!