Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
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
2 registered members (NnamueN, 1 invisible), 1,489 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
A7 ( demo) Physics templates? #141264
07/15/07 17:40
07/15/07 17:40
Joined: Oct 2005
Posts: 528
Italy
M
Mondivirtuali Offline OP
User
Mondivirtuali  Offline OP
User
M

Joined: Oct 2005
Posts: 528
Italy
why there is not A7 Physics templates? A7 should have unlimite Phis. in every editon. A template for basic phis objects ( cans, balls).
I did not find even a code for a phis. ob

Re: A7 ( demo) Physics templates? [Re: Mondivirtuali] #141265
07/15/07 20:25
07/15/07 20:25
Joined: Mar 2007
Posts: 677
0x00000USA
M
MrCode Offline
User
MrCode  Offline
User
M

Joined: Mar 2007
Posts: 677
0x00000USA
I think that's because it's not that hard to write your own physics action:

Code:

action phys_obj
{
ph_setgravity(vector);
phent_settype(my,PH_TYPE,ph_type);
phent_setmass(my,m,ph_type);
phent_setfriction(my,f);
phent_setelasticity(my,b,min);
phent_setdamping(my,l,a);
}



and btw, A7 does have full physics with every edition.


Code:
void main()
{
    cout << "I am MrCode,";
    cout << "hear me roar!";
    system("PAUSE");
}
Re: A7 ( demo) Physics templates? [Re: MrCode] #141266
07/15/07 20:34
07/15/07 20:34
Joined: Oct 2005
Posts: 528
Italy
M
Mondivirtuali Offline OP
User
Mondivirtuali  Offline OP
User
M

Joined: Oct 2005
Posts: 528
Italy
Okay, let's try this code

Re: A7 ( demo) Physics templates? [Re: Mondivirtuali] #141267
07/15/07 23:33
07/15/07 23:33
Joined: Oct 2005
Posts: 528
Italy
M
Mondivirtuali Offline OP
User
Mondivirtuali  Offline OP
User
M

Joined: Oct 2005
Posts: 528
Italy
In A6 660 does not work... it is lite C only for A7 , I guess.

Re: A7 ( demo) Physics templates? [Re: Mondivirtuali] #141268
07/15/07 23:41
07/15/07 23:41
Joined: Oct 2005
Posts: 528
Italy
M
Mondivirtuali Offline OP
User
Mondivirtuali  Offline OP
User
M

Joined: Oct 2005
Posts: 528
Italy
No, it does not work neither with A7. Code:
action phys_obj
{
ph_setgravity(vector);
phent_settype(my,PH_TYPE,ph_type);
phent_setmass(my,m,ph_type);
phent_setfriction(my,f);
phent_setelasticity(my,b,min);
phent_setdamping(my,l,a);
}



and include it in the main wdl
then I assigned the action to a ball.
the parameters are all unknown


Last edited by Mondivirtuali; 07/15/07 23:43.
Re: A7 ( demo) Physics templates? [Re: Mondivirtuali] #141269
07/15/07 23:55
07/15/07 23:55
Joined: Mar 2007
Posts: 677
0x00000USA
M
MrCode Offline
User
MrCode  Offline
User
M

Joined: Mar 2007
Posts: 677
0x00000USA
I just made it so that you could change the letters to actual numbers.

The ph_type statements aren't real C-Script instructions (no, this isn't a Lite-C script, ). You have to change them to either ph_box, ph_sphere, or ph_poly (but don't use that one unless you want it to be a static object; it's very erratic when in motion).

The letters have to be changed to vars or numbers. Of course the engine won't accept things like a,b,j,m,e,etc., unless they're vars that were defined befoehand.

I tend to give code that is requested in a generalized format, meaning you can replace any letters, pseudo-instructions, etc. with your own vars and real instructions. It makes things a lot more tweakable; or at least it should.


Code:
void main()
{
    cout << "I am MrCode,";
    cout << "hear me roar!";
    system("PAUSE");
}
Re: A7 ( demo) Physics templates? [Re: MrCode] #141270
07/16/07 00:56
07/16/07 00:56
Joined: Oct 2005
Posts: 528
Italy
M
Mondivirtuali Offline OP
User
Mondivirtuali  Offline OP
User
M

Joined: Oct 2005
Posts: 528
Italy
Ah..thanks anyway.
letter with numbers
and another thing, the P engine works with spheres and boxes but what if I assign the box action to a model with different shape?

Re: A7 ( demo) Physics templates? [Re: MrCode] #141271
07/16/07 01:03
07/16/07 01:03
Joined: Oct 2005
Posts: 528
Italy
M
Mondivirtuali Offline OP
User
Mondivirtuali  Offline OP
User
M

Joined: Oct 2005
Posts: 528
Italy
Code:
 action phys_obj
{
ph_setgravity(vector);
phent_settype(my,PH_SHERE,ph_sphere);
phent_setmass(my,3,ph_sphere);
phent_setfriction(my,5);
phent_setelasticity(my,1,min);
phent_setdamping(my,2,1);
}
phent_setmass(my,3,ph_sphere);
phent_setfriction(my,5);
phent_setelasticity(my,1,min);
phent_setdamping(my,2,1);
}


and then?

Re: A7 ( demo) Physics templates? [Re: Mondivirtuali] #141272
07/16/07 01:12
07/16/07 01:12
Joined: Oct 2005
Posts: 528
Italy
M
Mondivirtuali Offline OP
User
Mondivirtuali  Offline OP
User
M

Joined: Oct 2005
Posts: 528
Italy
Code:
 action phys_obj
{var jupiterGravity[3];

ph_setgravity(jupiterGravity);
phent_settype(my,PH_SPHERE,ph_sphere);
phent_setmass(my,3,ph_sphere);
phent_setfriction(my,5);
phent_setelasticity(my,6,1);
phent_setdamping(my,2,1);
};



It start but the damn ball is inamovible. it lacks some add code for made the thing move, walking against or shooting to it.


Last edited by Mondivirtuali; 07/16/07 01:19.
Re: A7 ( demo) Physics templates? [Re: Mondivirtuali] #141273
07/16/07 01:54
07/16/07 01:54
Joined: Mar 2007
Posts: 677
0x00000USA
M
MrCode Offline
User
MrCode  Offline
User
M

Joined: Mar 2007
Posts: 677
0x00000USA
Does jupiterGravity have a value?

I also believe that you have to have a tall pole of some kind (it doesn't have to be visible) made of a level block to set the area limits for the physics engine.

An alternative would be to just engulf the level in a skycube.

Last edited by MrCode; 07/16/07 01:56.

Code:
void main()
{
    cout << "I am MrCode,";
    cout << "hear me roar!";
    system("PAUSE");
}
Page 1 of 2 1 2

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