Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 900 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 6 of 9 1 2 3 4 5 6 7 8 9
Re: some a6 physics questions #15451
04/29/03 09:19
04/29/03 09:19
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
quote:
Originally posted by elsewood:
Make the code like that:
code:
 

entity* myCrate;
action ball
{
myCrate=my;
phent_settype(myCrate,PH_RIGID,PH_SPHERE);
phent_setmass(crateMass);
}

This DOES NOT fix phent_setmass!!, only phent_settype
That's because phent_settype is correct above but phent_setmass isn't. _setmass takes 3 parameters.

Given that i'm pretty sure my woes are edition related, sorry I ever brought this up [Embarrassed]

Re: some a6 physics questions #15452
04/29/03 21:12
04/29/03 21:12
Joined: Jan 2003
Posts: 10
france
T
thuan Offline
Newbie
thuan  Offline
Newbie
T

Joined: Jan 2003
Posts: 10
france
Hello,
I try this script:

var earthgravity[3] = 0,0, -386;
function emit_sphere(); //prototype of the function
action sphere

{

my.shadow=on;
ph_setgravity( earthgravity );
phent_settype(my, PH_RIGID, PH_SPHERE);
phent_setmass(my, 5, PH_SPHERE);
phent_setfriction(my, 70);
phent_setelasticity(my, 50, 10);
phent_setdamping(my, 20, 20 );

temp.x=cos(camera.pan)*cos(camera.tilt)*300000; temp.y=sin(camera.pan)*cos(camera.tilt)*300000;
temp.z=sin(camera.tilt)*300000;

phent_addforcelocal(my,temp,nullvector);
}

string mdl_sphere=<sphere_0.mdl>;

function emit_sphere()
{
temp.x=camera.x+cos(camera.pan)*cos(camera.tilt)*100;
temp.y=camera.y+sin(camera.pan)*cos(camera.tilt)*100;
temp.z=camera.z+sin(camera.tilt)*100;
temp.z=camera.z+sin(camera.tilt)*100;
ent_create(mdl_sphere,temp,sphere);
}

on_mouse_left=emit_sphere;

It don't work.I receive this message:

Malfunction W1600:
entity not a physics object in sphere : phent_setmass(my, 5, PH_SPHERE);
phent_setfriction(my, 70);
phent_setelasticity(my, 50, 10);
phent_setdamping(my, 20, 20 );

Can you help me . Thanks

Re: some a6 physics questions #15453
04/29/03 21:45
04/29/03 21:45
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
which edition are you using? the physics engine doesn't work in the trial version.

i don't know what could cause your problem...
do you have a sphere_0.mdl in your directory?
gravity is a global setting it doesn't have to be set in the entity's action.

Re: some a6 physics questions #15454
04/29/03 21:52
04/29/03 21:52
Joined: Jan 2003
Posts: 10
france
T
thuan Offline
Newbie
thuan  Offline
Newbie
T

Joined: Jan 2003
Posts: 10
france
I have A6 commercial.
Ihave a sphere_0.mdl in my directory.
What it means :"entity not a physics object in sphere "?
Strange?

Re: some a6 physics questions #15455
04/29/03 21:57
04/29/03 21:57
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
this error message doesn't seem to be included in the manual yet...

try to rename sphere_0.mdl to sphere.mdl because with _0 it expects LOD...

does the error message appear at compilation time or when you press the mouse button?

Re: some a6 physics questions #15456
04/29/03 22:12
04/29/03 22:12
Joined: Jan 2003
Posts: 10
france
T
thuan Offline
Newbie
thuan  Offline
Newbie
T

Joined: Jan 2003
Posts: 10
france
the error message appear when I press the mouse button.

Re: some a6 physics questions #15457
04/29/03 22:19
04/29/03 22:19
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
try to place the sphere in WED and assign the sphere action to it. without the phent_addforcelocal...

does it happen with the first sphere you want to emit or only with the following ones? [Wink]

Re: some a6 physics questions #15458
04/29/03 22:41
04/29/03 22:41
Joined: Jan 2003
Posts: 10
france
T
thuan Offline
Newbie
thuan  Offline
Newbie
T

Joined: Jan 2003
Posts: 10
france
Again ,i have the same error message.
it happen only with the following ones.
[Confused]

Re: some a6 physics questions #15459
04/29/03 23:20
04/29/03 23:20

A
Anonymous
Unregistered
Anonymous
Unregistered
A



thuan: I copied your whole script exactly and tested it -> it goes on my system!
Are you sure, there isn't nothing else, which could make the error??
Because - my tip would be:
Make a new level, with only this code... If than the error message also appears it have to be a bug ?!

ventilator: I copied your car code (the VECTOR-"Bug" have I edit! -- so it doesn't explodes anymore [Big Grin] ) and have the problem, that the wheels centers its selve (=drehen sich um sich selber...!? [Wink] ). The aftereffect is, that the car jumps around the room [Razz] .
...Do you have an idea what's the reason??

Thx,
Clemens

P.S. Man-man... Was ich da für ein Müll unten geschrieben habe [Big Grin] . Aber naja, sieh's positiv: Evtl. hätte Marco sonst dein Problem übersehen. Außerdem konnte ich ihm somit mit dem Bilder-Lob eine Freude machen [Razz] [Big Grin] !!!

Re: some a6 physics questions #15460
04/29/03 23:43
04/29/03 23:43
Joined: Jan 2003
Posts: 10
france
T
thuan Offline
Newbie
thuan  Offline
Newbie
T

Joined: Jan 2003
Posts: 10
france
[QUOTE]Originally posted by Clemens:
[Because - my tip would be:
Make a new level, with only this code... If than the error message also appears it have to be a bug ?!

I do it and i have the same error message.

[Confused]

Page 6 of 9 1 2 3 4 5 6 7 8 9

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