Just so everyone knows, I'm not taking sides on this.
The rifle seems to operate in a strange manner. When I pull the bolt back, it remains in its rearward position until I pull the trigger. Then the bolt slams forward, fires the round, and then it recoils back, ejects the empty, but again remains in its rearward position! Is it supposed to do that?
OH YEAH!!! I knew that the "Tommy Gun" was blowback operated, but it never downed on me that it used the open bolt design. I never shot one, I only held one during a class demo one time. It is incredibly heavy, even with no ammo in the magazine! Can you imagine how heavy it would be with a 100 round drum magazine affixed to it?
Good points, and maybe lethalsquirrel will find some value in it. He told me, in a PM, that he was going to send me the scene that he is having trouble with. Then maybe I could find a solution to his problem, which may in fact be the solution that you came up with.
I'm looking into this for a good solution for you, but if anyone else can solve this for DrBalk, then please do and leave a comment. I already informed DrBalk that the Body attribute values cannot be changed once they have been assigned. You can only assign a Body value when spawning a new geometry.
HEYYYYYYYYYYYYYYYYY gulhan yildiz!!!!!!!!!!! You did not answer my questions. I know that you understand English because you wrote comments in English.
Let's try this again.... WHAT IS THIS SCENE ABOUT? I KNOW THAT IT'S A GAME OF SOME SORT, BUT YOU GIVE NO INSTRUCTIONS HOW TO PLAY IT. SO, HOW DO YOU PLAY THE GAME?
The truck cannot move because it is glued to the background. Also, there are other things that need to be corrected before this scene can work correctly.
Well, DrBalk... I have been consulting with kilinich about this issue (he knows more about Algodoo and Thyme scripting than anyone else except for maybe Emil the developer)and according to him, you cannot glue two objects together with script directly. The only way that it can be done is to delete one of the objects during a collision, and then spawn a copy of it with the same body number as the other object. When two geometries share the same body number, they are glued to each other.
It needs a description because no one would understand what to do with it without a description. Many scenes are not self-explanatory. Often people are too lazy to write a proper description, and they will simply type "hjhjkhkhk" or some other gibberish like that. It is especially frustrating when someone uploads a game, and they give no instructions how to play the game. I guess they figure that other people will read their mind!
I can't speak for kilinich, of course, but I believe that the use of a colon along with the equal sign when defining a variable is only for good programming practice, and not for anything that would affect the operation of the code. When you use the colon, Algodoo will warn you with a message in the console if you accidentally define the same variable twice. For example, in your "onClick" code, you define G0 in the first line. Just to prove my point, I added a line on top of the line that defines G0, as follows....
g0 := 0;
When I ran the code, the following message was printed in the console:
81870 ms: - WARNING - Variable "g0" already declared in this scope.
If there is any other reason for using the colon besides good programming practice, I would like to know about it.
There is another rule concerning colons, and that is when you assign values to variables within functions you must always use a colon along with the equal sign. I recall reading about that in the forum some time ago.
I try not to die every day. But what about your scene? It shows nothing but a reddish background and a few white lines. There is nothing else? If that's all there is, then it will be deleted. We do not allow scenes on Algobox that do nothing.
I remember seeing this effect when I was in Las Vegas many years ago. Quite often as the light from bright neon lights on the casinos would reflect off the rims and hubcaps of passing cars and motorcycles, the wheels looked like they were spinning backwards. It's a very strange effect to see in real life! It was due to the fact that the light from neon lights flickers at the rate of the electric mains (60Hz here in the U.S.).