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

Views: 197

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: Gravity scripts
Rating: 5
Filesize: 44.34 kB
Downloads: 502
Comments: 2
Ratings: 1
Date added: 2016/08/01 02:08:41
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Pulley
Rating: 5.625
Filesize: 0.75 MB
Downloads: 294
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: THYME PROGRAMMER NEEDED!
Rating: 6.0909
Filesize: 144.21 kB
Downloads: 991
Comments: 12
Ratings: 5
Date added: 2009/03/24 18:17:05
Made with: Phun
Rating: rated 6.1
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: 252
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: 302
Comments: 1
Ratings: 2
Date added: 2008/11/28 20:23:36
Made with: Phun
Rating: rated 4.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.