Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
7 registered members (3run, miwok, AndrewAMD, Quad, TipmyPip, fairtrader, 1 invisible), 637 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: First tutorial by William [Re: vlau] #77377
06/13/06 04:54
06/13/06 04:54
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
Yeah, you musta typed the mass setting wrong. In that tut it was set - phent_setmass(my, 3, PH_BOX); Though I don't know if the code from those physics tuts work 100% anymore, this stuff was written more than 2 years ago. Just play with values until it works.


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
Re: First tutorial by William [Re: vlau] #77378
06/15/06 09:36
06/15/06 09:36
Joined: Mar 2006
Posts: 724
the Netherlands
Frits Offline OP
User
Frits  Offline OP
User

Joined: Mar 2006
Posts: 724
the Netherlands
@FoxHound, @William;
Yes, there was a 3 in the original code 'phent_setmass(my, 3, PH_BOX);' I forgot to write in in the post.
@vlau;
like I mentioned before; gravity value of 0, the stone keeps floating.
Positive gravity, the stone goes up.
I have changed PH_POLY in PH_BOX, now the rock does not sink in the floor anymore but it will not roll nicely.

Regards,
Frits


I like to keep scripting simple, life is hard enough as it is.
Regards,
Frits
Re: First tutorial by William [Re: Frits] #77379
06/15/06 09:45
06/15/06 09:45
Joined: Apr 2005
Posts: 2,332
Germany, BaWü
aztec Offline

Expert
aztec  Offline

Expert

Joined: Apr 2005
Posts: 2,332
Germany, BaWü
Quote:

When I try this;
Code:

var earthgravity[3]=0,0,-300;
entity* boulderm;

string boulder=<fels1_0.mdl>;

function emit_sphere();

action boulder_move
{
boulderm=me;
my.shadow=on;

phent_settype(me,PH_RIGID,PH_poly);
ph_setgravity(earthgravity);
phent_setmass(me,PH_BOX);
phent_setfriction(me,70);
phent_setelasticity(me,30,10);
}

function emit_sphere()
{
if(boulderm!=null) {remove(boulderm);}// remove this bracket
{
temp.x=camera.x;
temp.y=camera.y;
temp.z=camera.z;
ent_create(boulder,temp,boulder_move);
}
}

on_mouse_middle=emit_sphere;



I get an error;
Syntax error - non existent/empty function remove

When I change place; fist function then action, I get also an error;
Parameter unknown boulder_move.

I don't understand this, what goes wrong here?

Regards,
Frits




try tzhis and tell me if it works


Visit:
schwenkschuster-design.de
Re: First tutorial by William [Re: aztec] #77380
06/15/06 10:22
06/15/06 10:22
Joined: Aug 2005
Posts: 1,558
HK
V
vlau Offline
Serious User
vlau  Offline
Serious User
V

Joined: Aug 2005
Posts: 1,558
HK
As William said, try different value, try to
change PH_BOX to PH_SPHERE also, I think it
is best for round objects.

I'm sorry I can't write a whole workable program
for you.

Re: First tutorial by William [Re: Frits] #77381
06/15/06 10:23
06/15/06 10:23
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
If your using a rock, use PH_Sphere. Your gravity will have to be a negative value, or there will be none...


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
Re: First tutorial by William [Re: William] #77382
06/15/06 12:46
06/15/06 12:46
Joined: Mar 2006
Posts: 724
the Netherlands
Frits Offline OP
User
Frits  Offline OP
User

Joined: Mar 2006
Posts: 724
the Netherlands
@Star Fox
The code woks, follow the posts.
@vlau, William
I have tried that, the rock keeps rolling a veeeeerry long time.

The only question that remain; why sinks the rock slowly into the floor when I use PH_POLY?

Regards,
Frits


I like to keep scripting simple, life is hard enough as it is.
Regards,
Frits
Re: First tutorial by William [Re: Frits] #77383
07/04/06 10:31
07/04/06 10:31
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline
Senior Expert
PHeMoX  Offline
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
I'm having similar difficulties with the physics, but I can show you my code. I think it's really a matter of finding the right values..

Code:
action crate
{
//phent_enable( my, 1 );
phent_settype( me, PH_RIGID, PH_BOX);
phent_setmass(my, 10, PH_SPHERE);
phent_setdamping(me,40,50);
phent_setfriction(my, 25);
phent_setmaxspeed( my, 300, 300);
ph_setcontacts(vector(80000, 0,0), 0,0,0);
ph_setautodisable(0.01, 0.008, 10, 0.1);
wait(1);
}



I haven't really find out though, why my AI enemies can move the crates like it should, but the player can't move them that easily, mostly the player bumps into the crate and get's stuck. Sort off..

Cheers


PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
Re: First tutorial by William [Re: PHeMoX] #77384
07/05/06 02:50
07/05/06 02:50
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
If your moving your player using c_move(), it wont interact with the physics entities, and will become stuck. In this case you'll have to use a scan or trigger, and when the physics entity gets within range, put a force on it(according to the angle of it and the player). It's also unfortunate that you cannot have physics entities passable unto certain normal entities. So you'll still "catch" onto the physics entities at times. For this reason, among others, I wouldn't reccomend having the physics engine play a big part in your game. Though mabye you'll be allright if your main character moves a bit slower, for very fast moving entities(in a racing game) you can catch things easier.


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
Re: First tutorial by William [Re: William] #77385
07/05/06 15:32
07/05/06 15:32
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline
Senior Expert
PHeMoX  Offline
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
Mmmm, yeah, then I will go with the scan and trigger, or would an invisible entity at the same location as the player do the trick??

Cheers


PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
Re: First tutorial by William [Re: PHeMoX] #77386
07/08/06 20:32
07/08/06 20:32
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
I'd go with a scan or trigger. You could try having an invisible physics entity there at all times, but you might still experience many problems with catching. Keep your scan or trigger with a wider range. I wish there was a better way to do this, but I cant think of any. Marco had previously said he doesn't intend to implement a way making physics entities passable unto certain normal entities, but hopefully he'll add this in one day.


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
Page 2 of 3 1 2 3

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