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

Views: 90

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: 207
Comments: 2
Ratings: 1
Date added: 2016/08/01 02:08:41
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: I tried my best to do this... (Walker)
Rating: 5
Filesize: 24.1 kB
Downloads: 2090
Comments: 5
Ratings: 1
Date added: 2015/01/09 18:11:15
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: HELP NEEDED
Rating: 5
Filesize: 98.62 kB
Downloads: 109
Comments: 5
Ratings: 1
Date added: 2015/07/02 17:06:12
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Open Bolt BFMG - Belt Fed Machine Gun
Rating: 7.2436
Filesize: 170.06 kB
Downloads: 17371
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: 187
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: 352
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.