Browse Search Popular Register Upload Rules User list Login:
Search:
Spring Reads Data

Image:
screenshot of the scene

Author: Xray

Group: Default

Filesize: 12.07 kB

Date added: 2021-10-08

Rating: 5.6

Downloads: 2393

Views: 388

Comments: 19

Ratings: 2

Times favored: 0

Made with: Algodoo v2.1.0

Tags:

Scene tag

This is mainly a sample scene for user UnityDogGaming04, but anyone who uses Thyme Scripting in their scenes is welcome to use it.

In this scene, script in the body of a spring reads the color of the objects that each end of the spring is attached to. The script can easily be modified to read most other parameters besides color.

Update: This script can not only READ data from the objects that the spring is attached to, but it can also WRITE data simply by reversing one of the script lines:

_Box1Color = Box1.color Reads the color of a box.

Box1.color = [1, 1, 1, 1] Writes a color array to a box.

Update: Lightened the background so that the spring is more visible.
Last edited at 2021/10/09 05:33:16 by Xray
Please log in to rate this scene
edit
Similar scenes
Title: Laser Disk Reader(simple)
Rating: 5.375
Filesize: 7.84 kB
Downloads: 322
Comments: 1
Ratings: 2
Date added: 2009/09/06 00:34:15
Made with: Algodoo before v1.8.5
Rating: rated 5.4
download
Title: Computer for Collab - 0.1.1b
Rating: 5
Filesize: 31.55 kB
Downloads: 676
Comments: 3
Ratings: 1
Date added: 2010/08/03 20:34:17
Made with: Algodoo before v1.8.5
Rating: rated 5
download
Title: Phun Wireless data transmitter
Rating: 5.125
Filesize: 15.81 kB
Downloads: 502
Comments: 0
Ratings: 2
Date added: 2011/01/16 18:54:52
Made with: Phun
Rating: rated 5.1
download
Title: hard disk on off simulation
Rating: 4.5
Filesize: 22.68 kB
Downloads: 448
Comments: 3
Ratings: 2
Date added: 2009/04/12 20:43:17
Made with: Phun
Rating: rated 4.5
download
Title: Dreaming visualized
Rating: 5
Filesize: 74.91 kB
Downloads: 833
Comments: 1
Ratings: 1
Date added: 2014/08/27 15:10:54
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Cool Usb Reader
Rating: 5
Filesize: 0.57 MB
Downloads: 736
Comments: 5
Ratings: 1
Date added: 2015/06/06 08:55:42
Made with: Algodoo v2.1.0
Rating: rated 5
download
Xray, algodoo is broken, i cant see the spring texture
MyNameIsThis -- Algodoo isn't broken. Either there's a problem with my scene, or there's a problem with your computer. But before I get all worked up about it, I want to first find out if anyone else is having the same issue as you are.

IS ANYONE ELSE NOT ABLE TO SEE THE SPRING TEXTURE IN THIS SCENE? PLEASE LET ME KNOW IF YOU CAN OR IF YOU CANNOT SEE THE TEXTURE BY LEAVING A COMMENT. THANKS!
Last edited at 2021/10/09 05:29:47 by Xray
I'm seeing red.
The spring's target length is really high for how close the endpoints are, if you reduce the target length the texture becomes coherent.
Thanks guys. :tup:
Last edited at 2021/10/11 03:10:26 by Xray
Hi Xray, I am kind of confused, you said I can't ask for help in a desciption, so am I meant to have no desc and write it in the comments? or is it that I had a blank scene?
You did it correctly in your current scene. You made a scene which has a technical problem and you explained what the problem is. Some people make the mistake of posting a text only scene, or a blank scene. We would rather people start asking for help with a partially working or non-working scene.
Ok. That makes sense.
The postStep just has a ? in it
JP -- That's because you selected the entire spring which will include the body of the spring and both endpoints. If you want to see the code that is only in the body, then you have to hold down the "Alt" key when you select it. That way, Algodoo will ignore the endpoints and show you just the script in the body portion of the spring.
Xray, what means ":bonk: ,:unsure: ,:rolleyes: and :devil: "
I'm not 100% certain about any of these but I'll give you my best guesses:

:bonk: means "I should have known that", or "Why didn't I think of that?"

:unsure: means "I'm not sure."

:rolleyes: means "I'm rolling my eyes". When a person rolls their eyes they are saying without using words "How can you be so stupid!" or "What you said is really dumb!"

:devil: means what I said was intended to be devilish or sarcastic. or it can also mean "Oh, you little devil!"
And what means ":blush: "
EDIT: i spelled means wrong >:(
Last edited at 2021/10/20 15:51:38 by MyNameIsThis
Are you planning on asking me what all TWENTY EIGHT emojis mean? If you are, forget it! Besides, like I said, I am just guessing what they mean, and so if you want accurate definitions, you should do a little work and research them yourself. You can search "emoji meanings" or something like that on Google.
Hi Xray, how do you do a if with 2 conditions? for example if angle >1 or <1? I know there's the & thing you can put but I don't know what it means.
angle > 1.0 || angle < 1.0 ? {do this}:{else, do this}

Logical operands:

|| ... OR
&& ... AND
== ... EQUAL
!= ... not equal
<= ... LESS THAN OR EQUAL
>= ... GREATER THAN OR EQUAL

For Boolean results (true or false), it's a little different.

For example, scene.my.var can be true or false, and you need to do something if true, or NOT do something if false:

scene.my.var ? {do this if true}:{do this if false}
Note: Either bracket can be empty (do nothing) if desired.

You can also use the ! (NOT) in front of a variable like this:
!scene.my.var ? {}:{}
That says "If the opposite of scene.my.var is TRUE (in other words FALSE, {do this}:{}"

Hope this helps!
Last edited at 2021/11/07 02:22:08 by Xray
Thanks Xray. Very helpful.:)
the possibilites are endless
Well, technically not endless, but I know what you mean. A LOT! :lol: