Xrel -- I noticed that the textures do not shrink along with the size of the box's when hit by the laser. That can be fixed by adding a little something to the textureMatrix. Here is a standard textureMatrix = [1.0, 0.0, 0.5, 0.0, 1.0, 0.5, 0.0, 0.0, 1.0]. If you add two simple calculations, then the size of the texture will increase or decrease with the size of the box. You need to modify elements 0 and 4 of the textureMatrix array like this:
I agree with the other reviewers. This is truly epic! I especially like how you made each passenger independently reacts to inertial forces as the bus moves over the road. Your attention to detail is impressive.
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:
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.
You can liquify the doll when that other thing collides with it instead of using the laser. In that thing that hits him, put e.other.liquify in the onCollide event. I did that and it works very well.
42flowermaster -- No I didn't get to 40 except maybe by cheating.
BTW, I tried every possible tricky way to get the answer to number four as being 18, but nothing tricky seems to work. It's driving me crazy, so what am I missing?
I got to 103 but then my snake got tied up in its own loop that I was not able to get out of. Nice game!
Suggestions: There are a couple of enhancements you can add to make the game more challenging, and they are 1. A timer and 2. The game ends if the head of the snake crashes into its own body. The timer resets each time you add a segment to the snake's body, and then you must get another segment within (10 or 15 seconds, or whatever time you decide). If the timer times out before getting another segment, Game Over.
I made a similar game called "Blockade" that I posted about 10 years ago.
Ozziegerff -- Sorry, I was not able to modify the scene per your request. Each time I try something that I think will work I just end up making a mess of it!
FYI - I noticed that you store values in variables like this:
scene.my.SP = scene.my.SP = 1
Although that will work, the extra "scene.my.SP" is not needed. The correct
syntax is:
scene.my.SP = 1
It is perfectly Okay to store a particular value into multiple variables like this:
scene.my.var1 = scene.my.var2 = scene.my.var3 = 3.14
That script will store 3.14 into each of those variables.
Quote: " i don't think theres much for it to spy on though."
Reply: That's what governments WANT you to think! Haven't you heard about the under-ground military bases where they store crashed Alien spacecrafts and injured Aliens? Yup, it's all true. I learned about that on the Ancient Aliens TV show.
If each step were attached to a rack that rotates a pinion on a generator shaft, you could produce electric power whenever people walked up or down the stairs. With that idea in place, parents would encourage children to run up and down stairs instead of frustratingly yelling at them to STOP IT!
I think those ideas (yours and mine) work in theory, but would fail miserably in practice. I can see many ways in which the steps would become out of synch, such as when kids "play" on the stairs, or when adults change their minds on going up or down the stairs, and switch direction at the half-way point.
About the only thing stair generators might be good for is to flash LED lights and/or play musical tones in order to amuse people while using the stairs. I have actually seen that done in real life but I could not remember where I saw it. It might have been at a science museum 30 or 40 years ago.