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
4 registered members (TipmyPip, AndrewAMD, dBc, clonman), 18,621 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
Page 2 of 2 1 2
Re: A7 ( demo) Physics templates? [Re: MrCode] #141274
07/16/07 02:21
07/16/07 02:21
Joined: Oct 2005
Posts: 528
Italy
M
Mondivirtuali Offline OP
User
Mondivirtuali  Offline OP
User
M

Joined: Oct 2005
Posts: 528
Italy
I don't get it. The ball.mdl is placed inside a level ( a large cube).
It required a invisible cube , also?
No, I need a complete code in order to study it.

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

Joined: Mar 2007
Posts: 677
0x00000USA
no, what you have is fine.

As for the complete Code:

var video_mode= 8;
var video_screen= 1;
var video_depth= 32;

var count_of_ents;

ENTITY* _ball;

action ball
{
_ball= me;
ph_setgravity (nullvector);
ph_fps_max_lock= 75;
phent_settype (my,PH_RIGID,ph_sphere);
phent_setmass (my,3,ph_sphere);
phent_setfriction (my,30);
phent_setelasticity (my,50,10);
wait(-30);
ent_remove(me);
count_of_ents-= 1;
}

ENTITY* cam;

action dummy_cam
{
cam= me;
phent_settype (my,PH_RIGID,ph_box);
phent_setmass (my,10,ph_box);
phent_setfriction (my,10);
phent_setelasticity (my,20,10);
phent_setdamping(my,90,90);
while(1)
{
phent_addtorquelocal (my,vector(0,20 * (mouse_force.y * time_step * -1),0));
phent_addtorquelocal (my,vector(0,0,20 * (mouse_force.x * time_step * -1)));
phent_addvellocal (my,vector(25 * (mouse_left - mouse_right) * time_step,0,0),nullvector);
if(mouse_middle== on)
{
phent_addtorquelocal (my,vector(25 * (mouse_force.x * time_step),0,0));
}
camera.pan= my.pan;
camera.tilt= my.tilt;
camera.roll= my.roll;
camera.x= my.x;
camera.y= my.y;
camera.z= my.z;
wait(1);
}
}

function spawn_ball()
{
count_of_ents+= 1;
ent_create ("earth.mdl",vector(random(200),random(-200),random(200)),ball);
phent_addvellocal (_ball,vector(random(50),random(-50),random(-50)),vector(random(-20),random(15),random(-10)));
while(1)
{
vec_set(temp,vector(_ball.x,_ball.y,_ball.z));
vec_to_screen(temp,camera);
draw_line(temp,vector(255,255,255),100);
draw_line(vector(512,384,0),vector(255,255,255),100);
wait(1);
}
}

function main()
{
level_load ("0g_experience.wmb");
on_space= spawn_ball;
}

panel _diag
{
digits(0,0,"Number of ents= %1.0f",_a4font,1,count_of_ents);
flags= visible;
}



This is a script I wrote to test the A7 unlimited physics.


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

Joined: Oct 2005
Posts: 528
Italy
Thanks!! Tomorrow , I 'll give you the feedback.

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

Joined: Oct 2005
Posts: 528
Italy
Okay , now the ball does move ,the behavior is not exactly realistic but , otherwise, it moves.



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

Joined: Oct 2005
Posts: 528
Italy
I am working on A6 6.60 comm
I try to add another P. object , with this codeCode:
 
action phys_obj1
{var earthgravity[3] = 0,0, -386;


ph_setgravity(earthgravity);
phent_settype(my,PH_RIGID,PH_BOX );
phent_setmass(my,5,PH_BOX );
phent_setfriction(my,30);
phent_setelasticity(my,50,10);
phent_setdamping(my,90,90);
};
}


but at the startup it said me that is not a p. object. This one is distant by the ball with the ball (working ) action. Code:
  



Last edited by Mondivirtuali; 07/16/07 19:54.
Re: A7 ( demo) Physics templates? [Re: Mondivirtuali] #141279
07/16/07 20:18
07/16/07 20:18
Joined: Oct 2005
Posts: 528
Italy
M
Mondivirtuali Offline OP
User
Mondivirtuali  Offline OP
User
M

Joined: Oct 2005
Posts: 528
Italy
Okay, I made a similar test level in A7 , giving this action to 3 different models

2 sphere and a woman model.Code:

action phys_obj
{var earthgravity[3] = 1,1, -386;


ph_setgravity(earthgravity);
phent_settype(my,PH_RIGID,ph_sphere);
phent_setmass(my,3,ph_sphere);
phent_setfriction(my,30);
phent_setelasticity(my,50,10);
phent_setdamping(my,90,90);
};
}


the spheroids mdl remain immoble, both.
The woman mannequin roll over then stops.

Last edited by Mondivirtuali; 07/16/07 20:18.
Re: A7 ( demo) Physics templates? [Re: MrCode] #141280
07/17/07 12:55
07/17/07 12:55
Joined: Oct 2005
Posts: 528
Italy
M
Mondivirtuali Offline OP
User
Mondivirtuali  Offline OP
User
M

Joined: Oct 2005
Posts: 528
Italy
Quote:

no, what you have is fine.

As for the complete Code:

var video_mode= 8;
var video_screen= 1;
var video_depth= 32;

var count_of_ents;

ENTITY* _ball;

action ball
{
_ball= me;
ph_setgravity (nullvector);
ph_fps_max_lock= 75;
phent_settype (my,PH_RIGID,ph_sphere);
phent_setmass (my,3,ph_sphere);
phent_setfriction (my,30);
phent_setelasticity (my,50,10);
wait(-30);
ent_remove(me);
count_of_ents-= 1;
}

ENTITY* cam;

action dummy_cam
{
cam= me;
phent_settype (my,PH_RIGID,ph_box);
phent_setmass (my,10,ph_box);
phent_setfriction (my,10);
phent_setelasticity (my,20,10);
phent_setdamping(my,90,90);
while(1)
{
phent_addtorquelocal (my,vector(0,20 * (mouse_force.y * time_step * -1),0));
phent_addtorquelocal (my,vector(0,0,20 * (mouse_force.x * time_step * -1)));
phent_addvellocal (my,vector(25 * (mouse_left - mouse_right) * time_step,0,0),nullvector);
if(mouse_middle== on)
{
phent_addtorquelocal (my,vector(25 * (mouse_force.x * time_step),0,0));
}
camera.pan= my.pan;
camera.tilt= my.tilt;
camera.roll= my.roll;
camera.x= my.x;
camera.y= my.y;
camera.z= my.z;
wait(1);
}
}

function spawn_ball()
{
count_of_ents+= 1;
ent_create ("earth.mdl",vector(random(200),random(-200),random(200)),ball);
phent_addvellocal (_ball,vector(random(50),random(-50),random(-50)),vector(random(-20),random(15),random(-10)));
while(1)
{
vec_set(temp,vector(_ball.x,_ball.y,_ball.z));
vec_to_screen(temp,camera);
draw_line(temp,vector(255,255,255),100);
draw_line(vector(512,384,0),vector(255,255,255),100);
wait(1);
}
}

function main()
{
level_load ("0g_experience.wmb");
on_space= spawn_ball;
}

panel _diag
{
digits(0,0,"Number of ents= %1.0f",_a4font,1,count_of_ents);
flags= visible;
}



This is a script I wrote to test the A7 unlimited physics.




I tryed this in A7 and it does not working; the balls are inamovible.

Page 2 of 2 1 2

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