Weapons and Physics

Posted By: MMike

Weapons and Physics - 08/05/04 21:51

I want to be able to shoot over a physic enity and affect it..
How can this be done with A6 Physics?? Without newton pluggin cause ..it only support the wep16 , and it can't react to player...
So any help would be nice.
Posted By: Superjeu3D

Re: Weapons and Physics - 08/06/04 00:22

If you want make with newton, i can't help you... But if you want make with "motor of physic" with A6 com or pro, i think that i can help you ( )

If i understand good, you want shooting a physic entity, isn't it?? Where's the problem??

If your shoot able the physic entity, she's dead..

Your entity (not shoot) hat skill1=1

FUNCTION id_shoot
{if(event_type==event_entity)
{if(you.skill1==1){make_action;}}}

ACTION Shoot
{
my.enable_entity=on;
my.event = id_shoot;
...
}

If it's not this your question, i'm sorry, but i'm not write and read good your langage...

++
Posted By: WizRealm

Re: Weapons and Physics - 08/06/04 02:45

If you have A6 Com your going to have to use Newton but don't worry you can makes lots of good weapons in Newton. In fact some RazorAI weapons use Newton physics.

edit: opps put can't instead of can
Posted By: Superjeu3D

Re: Weapons and Physics - 08/06/04 04:07

Arf, i have A6 pro... I not known Newton...
Posted By: MMike

Re: Weapons and Physics - 08/06/04 09:38

I have the newton pluggin!!! its very useful.. but
We can only use the wep16 as weapon to shoot newtonws entities!
And i want not only the wep16! thats why i'm asking if we can do it with A6 physics.. any idea
Posted By: WizRealm

Re: Weapons and Physics - 08/06/04 10:29

You can use it for alot more than wep16. I used it for several guns for RazorAI (which I need a nod from Rhurac to reveil sorry..) so it can be used for alot of things. What kind of gun are you looking to create? Maybe I can help.
Posted By: MMike

Re: Weapons and Physics - 08/06/04 12:15

you can???
which version of newton ???
And can the player interact with the objects??
Cause i a have box.. the player aren't able to move it..etc..
what is the script?
Posted By: WizRealm

Re: Weapons and Physics - 08/06/04 12:50

It sounds like the only problem is you need to learn newton... First update to the latest editon. Go through all the tutorials to learn how to use it and ask around on the newton boards once you can use newton then try making weapons with it. The same would apply with A6 Physics you need to take some time to learn as I'm certainly not going to program em all for you if you don't know newton. Sorry if I come as rude but your showing you don't have the basics down and I can't help you there expect tell you where to get em.
Posted By: MMike

Re: Weapons and Physics - 08/06/04 17:40

In newton i just use the actions on wed... and ..thats all. I know to use it.
(basis)
Posted By: WizRealm

Re: Weapons and Physics - 08/07/04 00:35

No no see you need to learn how to _code_ newton then you will be able to make more than wep16 this would be the same with the A6 Physics engine. If you want anything more out of gstudio than the templates you got to learn how to code.
Posted By: MMike

Re: Weapons and Physics - 08/07/04 12:28

Wgat you mean with how yo code??
I remebeber to mix newtons and physics... like
action box-push{

newtonwoodentity();
Phsetype... and the result was unstable..

Can you help so?
Posted By: WizRealm

Re: Weapons and Physics - 08/07/04 12:51

All the help you need is here http://physicsengine.com/forum/ . When you got the basics under control come back.
Posted By: MMike

Re: Weapons and Physics - 08/07/04 21:55

Ok thax.. i got it ..i know how to do it.. and i did it.. its very simple indeed.. Work very nice..
:P
Posted By: Rhuarc

Re: Weapons and Physics - 08/08/04 02:30

Basically all you need to do to get other weapons working with Newton is to set the following in your weapon:

my.skill4=mass;
my.skill5=speed;

The force impacted by the bullet will be equal to mass*speed. The problem with weapons in the templates is that these skills are used for bulletspeed and (i think) ammotype. If either one of those is set to 0, the bullet won't do anything to the Newton entity.

An alternate solution is to open up NewtonScript2.wdl and go down to the "NewtonGSScriptEvent" function. Then, find the following code in the EVENT_TYPE == event_shoot IF-Clause:

Code:
 

newtonImpulseRecord[6] = you.skill4;
newtonImpulseRecord[7] = you.skill5;



and change it to:

Code:
 

newtonImpulseRecord[6] = 1;
newtonImpulseRecord[7] = 1000; //F=1*1000=1000



Doing that will make the Newton objects react every single gun you use.

-Rhuarc
Posted By: MMike

Re: Weapons and Physics - 08/08/04 05:00

Exaclty..
By the way how you set it for the player.. cause there are some tricks...but what you use to your player be able to interact with the newtons entities??
Posted By: WizRealm

Re: Weapons and Physics - 08/08/04 05:59

You can use create a force in the direction the player is walking.
Posted By: MMike

Re: Weapons and Physics - 08/08/04 10:56

but that need trace right??
Maybea a box enity?? invisible
>.>
<.<
Posted By: WizRealm

Re: Weapons and Physics - 08/08/04 11:13

No you simply send an impulse in the direction the character is walking. I don't have time to code it for you but read though the samples and your quickly learn how to create an impulse.
Posted By: Rhuarc

Re: Weapons and Physics - 08/09/04 01:53

A quick fix here is to change the enable_push and event_push parts of the system to enable_entity and event_entity, then making sure the newton object has a push value of 0 and is not passable. Then the player should react much better to the boxes. You could also increase the mass and speed values of the impulse like done with weapons in the event_entity (formerly push) IF-clause, right below the event code for being shot.

Reading the documentation and going through the samples will help you a lot and is really neccesary to know how to do all of that (and more).

-Rhuarc
Posted By: Generik

Re: Weapons and Physics - 08/20/04 10:20

All my stuff works with newtons physics even though all my guns are custom.... everything reacts. There shouldnt be any problems.
© 2024 lite-C Forums