Browse Search Popular Register Upload Rules User list Login:
Search:
Help needed.

Image:
screenshot of the scene

Author: Pootis-Man

Group: Default

Filesize: 25.36 kB

Date added: 2016-12-17

Rating: 5

Downloads: 67

Views: 92

Comments: 3

Ratings: 1

Times favored: 0

Made with: Algodoo v2.1.0

Tags:

Scene tag

How to make it work?
Please log in to rate this scene
edit
Similar scenes
Title: Pulley
Rating: 5.625
Filesize: 0.75 MB
Downloads: 123
Comments: 0
Ratings: 2
Date added: 2012/11/20 15:47:42
Made with: Algodoo v2.0.1 Edu
Rating: rated 5.6
download
Title: Grabby v1.1
Rating: 7.8571
Filesize: 304.18 kB
Downloads: 160
Comments: 4
Ratings: 7
Date added: 2009/01/05 11:34:51
Made with: Phun
no image found for this scene
Rating: rated 7.9
download
Title: Updated, Added Jetpack w/gun!
Rating: 7.8
Filesize: 142 kB
Downloads: 132
Comments: 4
Ratings: 5
Date added: 2009/01/23 23:49:38
Made with: Phun
no image found for this scene
Rating: rated 7.8
download
Title: HELP NEEDED
Rating: 5
Filesize: 98.62 kB
Downloads: 111
Comments: 5
Ratings: 1
Date added: 2015/07/02 17:06:12
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Waterrocket
Rating: 4.5
Filesize: 94.37 kB
Downloads: 190
Comments: 1
Ratings: 2
Date added: 2008/11/28 20:23:36
Made with: Phun
Rating: rated 4.5
download
Title: Car logos
Rating: 5
Filesize: 3.69 MB
Downloads: 370
Comments: 2
Ratings: 1
Date added: 2015/06/11 20:52:05
Made with: Algodoo v2.1.0
Rating: rated 5
download
I'm not certain if this is exactly what you want the box to do, but this simple script will make the size pulse between large and small, sort of like a heartbeat: size = [0.2, 0.1] * sin(sim.time)

If that is not what you want, then please explain in detail exactly what you would like the box to do.
I guess that's what you want. But keep in mind that the sine function goes from -1 to 1 so you're making the box go from positive size to negative size (and it disappears when it has negative size). Also if for some reason the sin(sim.time) gives 0, the box will get deleted by Algodoo

You have to do this:

size = [0.2, 0.1] * (sin(sim.time)+1.1)

This will make the sine function be between 0.1 and 2.1, so it will never be 0 (or negative for that matter).

Your problem was that you treated an array of numbers like a sum:
[2,1] is an array, while

[2+1] = [3] which is an array with 1 number (yes, it still is an array)
Please consider using math.sin instead of mere sin since it often happens that the algodoo config changes when loading scene, which often disables people like me from using sin in code. Math.sin is error-proof, while sin has the chance of not working on some systems.