Browse Search Popular Register Upload Rules User list Login:
Search:
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.
Last edited at 2016/05/16 18:10:15 by Xray
The poor thing has no arms or legs. :cry:
I tried it myself, and I had no problem moving script from update to postStep:

(e)=>{
keys.isdown("r") ? {
e.this.pos = [-974.5, 9.5]
} : {
collideSet = 1
};
keys.isdown("right") ? {
e.this.vel = [4, 0]
} : {
e.this.vel = [0, 0]
}
}


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.

Try that and let me know if it works for you.
Last edited at 2016/05/16 22:37:13 by Xray
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! :lol:
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!
Last edited at 2016/05/17 19:15:06 by Xray
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).

Comments?
Last edited at 2016/05/18 02:01:22 by Xray
"Sex balls"? I hope that was only a typo and not intentional! :o
Before it gets deleted????:s Are you kidding? This is one of the greatest scenes that were ever posted here on Algobox! :lol:


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.

Thanks, faytree! :)
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.:tup:
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.

Thanks
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! :o

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!

Nice job! :tup:
This is impossible! :o 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)?
Well, Firerey02? Do you want me to correct the spelling for you? Please answer me.
Why did I comment? I was bored.
It's very cute now! In fact, I want to take it home and cuddle it! :lol:

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!

Good job! :tup:
I hope so too! ISIS is a cancer that is spreading rapidly. :o
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. :tup:
Last edited at 2016/05/19 23:00:10 by Xray
I guess he doesn't understand English. :(

If you do not answer me soon, Firerey02, then I will delete this scene. So, please answer my question, Okay?
Last edited at 2016/05/20 03:30:59 by Xray
Yup, you got it! Good job! :tup:
Okay, I posted an example of what can be done. There are so many more things that you can do when you learn scripting!
Last edited at 2016/05/20 23:46:41 by Xray
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:


(e)=>{
keys.isdown("r") ? {
e.this.pos = [-974.5, 9.5]
} : {
collideSet = 1
};
keys.isdown("right") ? {
e.this.vel = [4, 0]
} : {
keys.isdown("left") ? {
e.this.vel = [-4, 0]
} : {
e.this.vel = [0, 0]
}
}
}

This should work. Try it! (copy and paste it into your scene)
Last edited at 2016/05/21 04:03:05 by Xray
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! :)
Okay.
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.
You're welcome! :tup:
Excellent work! Your scenes are all very good! :tup:
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! :tup:
All of those flickering colored boxes are cool, but what are they supposed to do? How will they work in your upcoming game? :s
previous | 1 … 182 183 184 185 186 … 443 | next