Browse Search Popular Register Upload Rules User list Login:
Search:
Help Please

Image:
screenshot of the scene

Author: AnAccount

Group: Default

Filesize: 25.96 kB

Date added: 2023-04-20

Rating: 5

Downloads: 160

Views: 112

Comments: 3

Ratings: 1

Times favored: 0

Made with: Algodoo v2.1.0

Tags:

Scene tag

Why is in the scene.
Please log in to rate this scene
edit
I believe the problem is because you are not using sin, cos, and tan properly. You are using those labels as temporary variables as shown here:

sin = math.sin(sim.time);
cos = math.cos(sim.time);
tan = math.tan(sim.time);

Sin is equivalent to math.sin(), and the same for cos and tan. Because of that, they must not be used as variables (like you did). So, simply choose some other variables such as _sin, _cos, and _tan. Make sure to first define those variables by using "onSpawn". You can initialize them with zero like this:

onSpawn = (e)=> {_sin = 0; _cos = 0; _tan = 0}

and your script in postStep will be:

_sin = math.sin(sim.time);
_cos = math.cos(sim.time);
_tan = math.tan(sim.time);

Caution: sin, cos, and tan will no longer work properly because your script permanently changed them when you used them as variables instead of functions. Because of that you need to RESET Algodoo. I had to do that for my Algodoo app after running your scene! Click on the little white gear next to "File" in the upper left corner, then select RESET and follow the simple instructions. Your scene should work after making those changes. Of course you will need to re-upload your scene. Then test it by downloading it from Algobox to make sure that it works as expected.
Last edited at 2023/04/21 01:34:09 by Xray
Actually, someone else made the scene.
So? Why did you ask for help for someone else's scene? Can't that other person ask for help?