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

Views: 200

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: 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: 993
Comments: 12
Ratings: 5
Date added: 2009/03/24 18:17:05
Made with: Phun
Rating: rated 6.1
download
Title: Open Bolt BFMG - Belt Fed Machine Gun
Rating: 7.2436
Filesize: 170.06 kB
Downloads: 23446
Comments: 14
Ratings: 7
Date added: 2017/12/28 03:47:29
Made with: Algodoo v2.1.0
Rating: rated 7.2
download
Title: Waterrocket
Rating: 4.5
Filesize: 94.37 kB
Downloads: 304
Comments: 1
Ratings: 2
Date added: 2008/11/28 20:23:36
Made with: Phun
Rating: rated 4.5
download
Title: junk, not needed
Rating: 7.5
Filesize: 9.45 kB
Downloads: 252
Comments: 2
Ratings: 10
Date added: 2009/01/11 19:47:33
Made with: Phun
Rating: rated 7.5
download
Title: Car logos
Rating: 5
Filesize: 3.69 MB
Downloads: 1483
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.