Gamestudio Links
Zorro Links
Newest Posts
No errors in the command line
by JMMAC. 05/06/26 16:20
U4GM Where I Found Water Filters for Avian Alarm
by Hartmann846. 05/06/26 08:52
U4GM Why Black Ops 7 Campaign Feels So Different
by Hartmann846. 05/06/26 08:51
Purchase A8 full licence version
by jcl. 05/05/26 11:20
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (TipmyPip, Quad), 5,935 guests, and 13 spiders.
Key: Admin, Global Mod, Mod
Newest Members
salisy, Hartmann846, dangyc, ukgamer, valino
19213 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Bouncing Shells? #29677
06/29/04 09:01
06/29/04 09:01
Joined: Oct 2002
Posts: 760
Sudbury, Ontario, Canada
Shummy_dup1 Offline OP
Developer
Shummy_dup1  Offline OP
Developer

Joined: Oct 2002
Posts: 760
Sudbury, Ontario, Canada
How would I partake in doing such work. Say I have my normal emiter:

Code:
 if(weapon_number==1)//////
{
ent_vertex(temp,765);///vertex shell
CREATE <case.mdl>,temp,Part_shell;
}



Now i got my Shell code where it does the normal random flips out of the case. How could i add physics to this...im thinking on using newtons.

Code:
 function Part_Shell()
{
my.passable = on;
my.metal = on;
my.scale_x *= 0.4;
my.scale_y *= 0.4;
my.scale_z *= 0.4;

// throw part
my._speed_x = random(6) - 3;
my._speed_y = random(6) - 3;
my._speed_z = random(3) + 8;

//reset:
my._aspeed_pan = 0 + random(20);
my._aspeed_tilt = 0 + random(70);
my._aspeed_roll = 0;

MY.PAN = YOUR.PAN;
MY.TILT = YOUR.TILT;

//Animate
my.skill9 = 20 + random(50);

while(my.skill9 > -16)
{
move_mode=ignore_models;
abspeed[0] = my._speed_x * time;
abspeed[1] = my._speed_y * time;
abspeed[2] = my._speed_z * time;

my.pan += my._aspeed_pan * time;
my.tilt += my._aspeed_tilt * time;
my.roll += my._aspeed_roll * time;

vec_scale(absdist,movement_scale); // scale absolute distance by movement_scale
move(my,nullvector,abspeed);

if(bounce.z)
{
my._speed_z = -(my._speed_z/2);
if(my._speed_z < 0.25)
{
my._speed_x = 0;
my._speed_y = 0;
my._speed_z = 0;
my._aspeed_pan = 0;
my._aspeed_tilt = 0;
my._aspeed_roll = 0;
}
}

my._speed_z -= 2*time;
my.skill9 -= 1;

//fade out:

my.alpha -= 2*time;
if(my.alpha <=0)
{
//remove
wait(1);
remove(me);


}
wait(1);
}

}



Any ideas...i want it to bounce on ground i can call a sound....and then remove(me);

Thanks.


version 4 simple www.ebsdesign.com stay updated on the aftermath click here for the gallery
Re: Bouncing Shells? [Re: Shummy_dup1] #29678
07/01/04 08:39
07/01/04 08:39
Joined: May 2004
Posts: 94
United States
not_my_name Offline
Junior Member
not_my_name  Offline
Junior Member

Joined: May 2004
Posts: 94
United States
Newtons Physics are excelent and easy to use, but this forum is strictly for A6 physics engine. if you cannot find your answer with this physics engine, newton is much easier, if you can figure out how to implement it in realtime. Give newton a try, and post questions at newtons forum.


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