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: 2932

Views: 618

Comments: 22

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: 383
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: Laser Disk Reader(simple)(Fixed)
Rating: 5.625
Filesize: 6.74 kB
Downloads: 560
Comments: 1
Ratings: 2
Date added: 2009/09/06 02:30:08
Made with: Algodoo before v1.8.5
Rating: rated 5.6
download
Title: Computer for Collab - 0.1.1b
Rating: 5
Filesize: 31.55 kB
Downloads: 795
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: 612
Comments: 0
Ratings: 2
Date added: 2011/01/16 18:54:52
Made with: Phun
Rating: rated 5.1
download
Title: Algobox today (real data)
Rating: 5
Filesize: 43.15 kB
Downloads: 519
Comments: 32
Ratings: 1
Date added: 2018/02/02 20:08:47
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Data transfer
Rating: 5
Filesize: 7.22 kB
Downloads: 186
Comments: 0
Ratings: 1
Date added: 2019/06/25 00:58:27
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:
The scenes spring is also completely red for me but I have seen that before so idk If there’s any problems
Does the block do anything?! I cannot even see the scripts you done.:huh:
As I stated in the scene description the script is in the body of the spring. Because a spring has three components (a body and two endpoints) you need to select the body by itself in order to view or modify the script in the body. You must select the body by itself by holding down the Alt key when you select the body of the spring with your cursor. If you want to select either endpoint you do it the same way.