Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (AndrewAMD), 16,038 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
[newton] crash in newtonbodyaddforce #54756
09/12/05 12:09
09/12/05 12:09
Joined: Sep 2005
Posts: 10
M
masood Offline OP
Newbie
masood  Offline OP
Newbie
M

Joined: Sep 2005
Posts: 10
i have a box and i want when i press y key it move.i write this code but in game when i press y key a message appear and say : crash in newtonbodyaddforce

action mynewtonwehicle
{
my.skill1 = 30; //mass
my.skill2 = 0.1;
my.skill3 = 0.1;
my.skill4 = 0.1;
my.skill5 = 0.1;

my.flag2 = on;

NewtonWoodEntity();

var p;
p = NewtonGetBody (my);

while(1)
{
if(key_y )
{
NewtonBodyAddforce(p,vector(200,0,0));
}
wait(1);
}
}

and if i change to NewtonBodyAddforce(p,2000,0,0); nothing happend.

Re: [newton] crash in newtonbodyaddforce [Re: masood] #54757
09/13/05 11:27
09/13/05 11:27
Joined: Apr 2005
Posts: 4,506
Germany
F
fogman Offline
Expert
fogman  Offline
Expert
F

Joined: Apr 2005
Posts: 4,506
Germany
I think the problem is that you call it in a while - loop.
But I don´t know it for sure.

Here´s a good example for interaction and adding forces to newton entities:

Thread:

http://www.coniserver.net/ubbthreads/sho...true#Post355859

Archive:

http://www.zingerhead.com/NGD_CustomScripts_Vol1.zip


no science involved

Moderated by  HeelX, Spirit 

Gamestudio download | 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