Post: Object Physics
08-27-2012, 03:19 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Reasoning:
Well this was by no means hard or anything, but I didn't know what to do with this and I CBA to make something advanced with it. I hope you can use this to make better cars and such for MW2/Cod4 or w/e you please. I just made this to test with some physics, and I didn't have a use for it. Enjoy.

What does it do?
This is simple, it creates a crate that goes along with the terrain (like a vehicle). It uses simple functions (built in by IW) and it's pretty easy to use. It Won't run over big walls such as a barrier, and it won't go too crazy over jagged terrain.

To Spawn:
    
self thread crateMove();


    
crateMove()
{
crate = spawn("script_model", self.origin+(0,0,30));
crate setModel( "com_plasticcase_enemy" );
crate.angles = self.angles;
self PlayerLinkTo( crate, "tag_origin", 0.5 );
wait 4;
crate crateStart();
}
crateStart()
{
for(;Winky Winky
{
//use this ifront to keep going forward.
//ifront = BulletTrace( self.origin, anglesToForward(self.angles) * 5, 0, self)[ "position" ];
o = self.origin;
ifront = self.origin + (5,5,5000);
floor = BulletTrace( ifront, ifront - (0,0,9000), 0, self)[ "position" ];
if(distance(floor, o) > 100)
break;
angle = vectorToAngles( floor - o )[1];
angle += 360;
angle = int( angle ) % 360;
angle -= 90;
if(angle < 45 || angle > -45)
self rotateTo(vectorToAngles( floor - o ),0.3);
self moveTo(floor, 0.3);
wait 0.3;
}
}
(adsbygoogle = window.adsbygoogle || []).push({});

The following 9 users say thank you to Jakes625 for this useful post:

247Yamato, homeedog, KingcreekS, Kitty=^.^=, LightModz, JokerRey, Restxrt Modz, Uk_ViiPeR, xePixTvx
08-27-2012, 03:59 AM #2
oyay
Bounty hunter
to advanced to me. thats why i stay away from gsc.
08-27-2012, 04:00 AM #3
Restxrt Modz
Do a barrel roll!
I guess this is cool Smile
08-27-2012, 10:44 AM #4
247Yamato
< ^ > < ^ >
I did something like this a long time ago for a vehicle. Smile

                    angle = vectorToAngles( floor - o )[1];
angle += 360;
angle = int( angle ) % 360;
angle -= 90;


:carling:

The following user thanked 247Yamato for this useful post:

08-27-2012, 03:34 PM #5
LightModz
League Champion
Originally posted by GAMER View Post
Reasoning:
Well this was by no means hard or anything, but I didn't know what to do with this and I CBA to make something advanced with it. I hope you can use this to make better cars and such for MW2/Cod4 or w/e you please. I just made this to test with some physics, and I didn't have a use for it. Enjoy.

What does it do?
This is simple, it creates a crate that goes along with the terrain (like a vehicle). It uses simple functions (built in by IW) and it's pretty easy to use. It Won't run over big walls such as a barrier, and it won't go too crazy over jagged terrain.

To Spawn:
    
self thread crateMove();


    
crateMove()
{
crate = spawn("script_model", self.origin+(0,0,30));
crate setModel( "com_plasticcase_enemy" );
crate.angles = self.angles;
self PlayerLinkTo( crate, "tag_origin", 0.5 );
wait 4;
crate crateStart();
}
crateStart()
{
for(;Winky Winky
{
//use this ifront to keep going forward.
//ifront = BulletTrace( self.origin, anglesToForward(self.angles) * 5, 0, self)[ "position" ];
o = self.origin;
ifront = self.origin + (5,5,5000);
floor = BulletTrace( ifront, ifront - (0,0,9000), 0, self)[ "position" ];
if(distance(floor, o) > 100)
break;
angle = vectorToAngles( floor - o )[1];
angle += 360;
angle = int( angle ) % 360;
angle -= 90;
if(angle < 45 || angle > -45)
self rotateTo(vectorToAngles( floor - o ),0.3);
self moveTo(floor, 0.3);
wait 0.3;
}
}


nice release, keep it up! so far every release u have done is amazing and completely different to all the others. hopefully someone could make something out of this Winky Winky
08-27-2012, 08:56 PM #6
Originally posted by 247Yamato View Post
I did something like this a long time ago for a vehicle. Smile

                    angle = vectorToAngles( floor - o )[1];
angle += 360;
angle = int( angle ) % 360;
angle -= 90;


:carling:


You're my fucking hero!

:carling:

:wub:
10-06-2012, 06:33 PM #7
Devil Child
Error… Cat invasion!
Originally posted by oyay View Post
to advanced to me. thats why i stay away from gsc.

easy=2
hard=3

if easy < hard
print "GSC iz Easy :p"
that was python
10-06-2012, 06:38 PM #8
247Yamato
< ^ > < ^ >
Originally posted by Devil
easy=2
hard=3

if easy < hard
print "GSC iz Easy :p"
that was python


You forgot a ":" after the "if" and a space in front of print :carling:

The following user thanked 247Yamato for this useful post:

10-06-2012, 08:34 PM #9
Devil Child
Error… Cat invasion!
Originally posted by 247Yamato View Post
You forgot a ":" after the "if" and a space in front of print :carling:

so you know python, but not gsc :lol:
10-07-2012, 08:49 AM #10
247Yamato
< ^ > < ^ >
Originally posted by Devil
so you know python, but not gsc :lol:


I know both :carling:

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo