Gamestudio Links
Zorro Links
Newest Posts
zorro with ccxt?
by qin. 01/07/26 00:31
The new evaluation system
by jcl. 01/05/26 08:50
bar time, right side open or close?
by Spirit. 01/03/26 08:10
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (Quad, qin), 3,682 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Syndrela, HDRSEO, AOUNZA, digitalboy381, agasior
19190 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