gun script

About advanced scenes, and the Thyme scripting language used in Algodoo.

gun script

Postby koskok » Wed Dec 21, 2011 3:38 pm

Hey guys,

I like making weapons,tanks,helis and more and for years i have been wondering how to make a gun with velocity scripting that shoots shells with the direction of the gun.

plzzzzzzzzzz explain me. :cry:
koskok
 
Posts: 13
Joined: Thu Jul 07, 2011 12:46 pm

Re: gun script

Postby monstertje3 » Wed Dec 21, 2011 7:54 pm

you should create a laser and a box, the laser is then pointing at the box
then in the onlaserhit of the box:

Code: Select all
vel:=e.normal*(yourspeed)


for example;
Code: Select all
Scene.addCircle({
            pos := e.pos;
            density := 7.5000000;
            vel := e.normal * (-5);
            restitution := 1;
            collideset := 1;
            radius := 0.050000001;
            color := [0.60000002, 0.60000002, 0.60000002, 1.0000000];
        });


the ball now goes in the direction of the laser against the box
Basically, there are only 10 types of people in the world. Those who know binary, and those who don't.
Light travels faster than sound. That's why some people appear bright until they open their mouths.
User avatar
monstertje3
 
Posts: 343
Joined: Sat Sep 05, 2009 4:29 pm
Location: N-H, NL

Re: gun script

Postby hiltropper » Sat Dec 24, 2011 11:34 am

there are other ways , but yes , thats easy. and search for it i know we had this topic many times because i have already made an example scene
http://www.algodoo.com/algobox/details.php?id=55177
[Edit] hmm..i just saw algobox still doesnt work
yup yup
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
hiltropper
 
Posts: 85
Joined: Mon Dec 20, 2010 12:02 pm
Location: Germany

Re: gun script

Postby bernhardz » Fri Apr 19, 2013 3:34 pm

We know that there's so many site about making guns, but its so good if you can make it your own idea and, so you can get your own ability.
A bee is never as busy as it seems; it's just that it can't buzz any slower.
Kin Hubbard's leather sap
User avatar
bernhardz
 
Posts: 1
Joined: Fri Apr 19, 2013 3:11 pm
Location: 123 street

Re: gun script

Postby marjhunaz » Tue May 06, 2014 10:21 am

This script can be used to create just about any basic weapon including machine guns, burst rifles.
marjhunaz
 
Posts: 1
Joined: Tue May 06, 2014 9:31 am


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 5 guests