Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, dr_panther, 1 invisible), 1,092 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Weapons and Physics [Re: WizRealm] #31737
08/07/04 12:28
08/07/04 12:28
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
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?

Re: Weapons and Physics [Re: MMike] #31738
08/07/04 12:51
08/07/04 12:51
Joined: Nov 2002
Posts: 1,342
WizRealm Offline
Expert
WizRealm  Offline
Expert

Joined: Nov 2002
Posts: 1,342
All the help you need is here http://physicsengine.com/forum/ . When you got the basics under control come back.

Re: Weapons and Physics [Re: WizRealm] #31739
08/07/04 21:55
08/07/04 21:55
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
Ok thax.. i got it ..i know how to do it.. and i did it.. its very simple indeed.. Work very nice..
:P

Re: Weapons and Physics [Re: MMike] #31740
08/08/04 02:30
08/08/04 02:30
Joined: Mar 2001
Posts: 3,298
Beverly, Massachusetts
Rhuarc Offline
Expert
Rhuarc  Offline
Expert

Joined: Mar 2001
Posts: 3,298
Beverly, Massachusetts
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


I no longer post on these forums, keep in touch with me via:
Linkedin.com
My MSDN blog
Re: Weapons and Physics [Re: Rhuarc] #31741
08/08/04 05:00
08/08/04 05:00
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
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??

Re: Weapons and Physics [Re: MMike] #31742
08/08/04 05:59
08/08/04 05:59
Joined: Nov 2002
Posts: 1,342
WizRealm Offline
Expert
WizRealm  Offline
Expert

Joined: Nov 2002
Posts: 1,342
You can use create a force in the direction the player is walking.

Re: Weapons and Physics [Re: WizRealm] #31743
08/08/04 10:56
08/08/04 10:56
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
but that need trace right??
Maybea a box enity?? invisible
>.>
<.<

Re: Weapons and Physics [Re: MMike] #31744
08/08/04 11:13
08/08/04 11:13
Joined: Nov 2002
Posts: 1,342
WizRealm Offline
Expert
WizRealm  Offline
Expert

Joined: Nov 2002
Posts: 1,342
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.

Re: Weapons and Physics [Re: WizRealm] #31745
08/09/04 01:53
08/09/04 01:53
Joined: Mar 2001
Posts: 3,298
Beverly, Massachusetts
Rhuarc Offline
Expert
Rhuarc  Offline
Expert

Joined: Mar 2001
Posts: 3,298
Beverly, Massachusetts
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


I no longer post on these forums, keep in touch with me via:
Linkedin.com
My MSDN blog
Re: Weapons and Physics [Re: Rhuarc] #31746
08/20/04 10:20
08/20/04 10:20
Joined: Aug 2004
Posts: 90
Canada
Generik Offline
Junior Member
Generik  Offline
Junior Member

Joined: Aug 2004
Posts: 90
Canada
All my stuff works with newtons physics even though all my guns are custom.... everything reacts. There shouldnt be any problems.

Page 2 of 2 1 2

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1