Post: [CODE] Dolphin Dive in MW2
02-27-2011, 08:32 PM #1
xQuZe-
You talkin to me?
(adsbygoogle = window.adsbygoogle || []).push({});
Dolphin Dive


Video:
[ame="https://www.youtube.com/watch?v=tGTgHMhjfkg"]Dolphin Dive[/ame]



Originally posted by another user
Yup, this is for MW2. Made this code because i wanted the abillity to dolphin dive in mw2.
I know it doesn't look that sexy but it's a start.
A good coder like derek or mossy could pick this up and make it better.
You can remove the HUDmessage if you want.
If you put this on onplayerspawned() it's just like a normal button.
It's just as in BO, Sprint and Circle.





Code:
    
Dive()
{
self endon("disconnect");
self maps\mp\gametypes\_hud_message::hintMessage("Press [{+breath_sprint}] and [{+stance}] to dive.");
self notifyOnPlayerCommand( "Run", "+breath_sprint" );
self notifyOnPlayerCommand( "Dive", "+stance" );
for(;Winky Winky
{
self waittill( "Run" );
self waittill( "Dive" );
self setPlayerAngles(self.angles + (22, 0, 0));
self setOrigin(self.origin+(0,0,25));
wait .01;
forward = self getTagOrigin("j_head");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
MaCrosshair = BulletTrace( forward, end, 0, self )[ "position" ];
setDvar("timescale", 0.4 );
wait .01;
self setOrigin(MaCrosshair+(0,0,0));
self SetStance( "prone" );
self freezeControls(true);
wait .2;
setDvar("timescale", 1.0 );
wait .5;
self freezeControls(false);
}
}
vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}


In 1 line:
    Dive(){self endon("disconnect");self maps\mp\gametypes\_hud_message::hintMessage("Press [{+breath_sprint}] and [{+stance}] to dive."); self notifyOnPlayerCommand( "Run", "+breath_sprint" );self notifyOnPlayerCommand( "Dive", "+stance" ); for(;Winky Winky {self waittill( "Run" );self waittill( "Dive" );self setPlayerAngles(self.angles + (22, 0, 0));self setOrigin(self.origin+(0,0,25));wait .01;forward = self getTagOrigin("j_head");        end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);        MaCrosshair = BulletTrace( forward, end, 0, self )[ "position" ];setDvar("timescale", 0.4 );wait .01;self setOrigin(MaCrosshair+(0,0,0));self SetStance( "prone" );self freezeControls(true);wait .2;                setDvar("timescale", 1.0 );wait .5;self freezeControls(false);}}vector_scal(vec, scale){        vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);        return vec;}

(adsbygoogle = window.adsbygoogle || []).push({});

The following 17 users say thank you to xQuZe- for this useful post:

Beta-, Brian235026, CleanMODSHD, Correy, emersons35, Fifa97, I am Mara, Man Dime, matt944057, maxrox, Mr. Aimbot, Ninja, Officer Laggy, oGHOSTLYMODZ, PussayPatrol, ViiZiiKz, xT4sSin
02-27-2011, 08:39 PM #2
this also would be just as cool but funny and hilarious i could also make it do a 360 but i think it might do that while your standing and it might look gay i wish i could do it like in mid dive

    Dive()
{
self endon("disconnect");
self maps\mp\gametypes\_hud_message::hintMessage("Press [{+breath_sprint}] and [{+stance}] to dive.");
self notifyOnPlayerCommand( "Run", "+breath_sprint" );
self notifyOnPlayerCommand( "Dive", "+stance" );
for(;Winky Winky
{
self waittill( "Run" );
self waittill( "Dive" );
self setClientDvar("cg_thirdPerson", "1");
setDvar("timescale", 0.25 );
self setPlayerAngles(self.angles + (22, 0, 0));
wait .1;
forward = self getTagOrigin("j_head");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
MaCrosshair = BulletTrace( forward, end, 0, self )[ "position" ];
self setOrigin(MaCrosshair+(0,0,0));
self SetStance( "prone" );
self freezeControls(true);
wait .7;
self freezeControls(false);
setDvar("timescale", 1.0 );
self setClientDvar("cg_thirdPerson", "0");
}
}

vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}
02-27-2011, 08:40 PM #3
xQuZe-
You talkin to me?
Originally posted by daboss
this also would be just as cool but funny and hilarious

    Dive()
{
self endon("disconnect");
self maps\mp\gametypes\_hud_message::hintMessage("Press [{+breath_sprint}] and [{+stance}] to dive.");
self notifyOnPlayerCommand( "Run", "+breath_sprint" );
self notifyOnPlayerCommand( "Dive", "+stance" );
for(;Winky Winky
{
self waittill( "Run" );
self waittill( "Dive" );
self setClientDvar("cg_thirdPerson", "1");
setDvar("timescale", 0.25 );
self setPlayerAngles(self.angles + (22, 0, 0));
wait .1;
forward = self getTagOrigin("j_head");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
MaCrosshair = BulletTrace( forward, end, 0, self )[ "position" ];
self setOrigin(MaCrosshair+(0,0,0));
self SetStance( "prone" );
self freezeControls(true);
wait .7;
self freezeControls(false);
setDvar("timescale", 1.0 );
self setClientDvar("cg_thirdPerson", "0");
}
}

vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}


Yea i was thinking of adding that but that makes it look even worse lol.
02-27-2011, 08:47 PM #4
Originally posted by xQuZe
Yea i was thinking of adding that but that makes it look even worse lol.

do you know if the 360 would be while your standingor in mid dive
02-27-2011, 08:52 PM #5
Blackstorm
Veni. Vidi. Vici.
MaCrosshair = BulletTrace( forward, end, 0, self )[ "position" ];
self setOrigin(MaCrosshair+(0,0,0));

^^^ Not good dude, change it to a range instead of spawning at your crosshair

The following user thanked Blackstorm for this useful post:

PussayPatrol
02-27-2011, 08:53 PM #6
N3G6
SE Pro
it needs more of a jump before the diving part
02-27-2011, 08:55 PM #7
xQuZe-
You talkin to me?
Originally posted by .Blackstorm View Post
MaCrosshair = BulletTrace( forward, end, 0, self )[ "position" ];
self setOrigin(MaCrosshair+(0,0,0));

^^^ Not good dude, change it to a range instead of spawning at your crosshair


Yea i know dude but when i did it it only dived to one direction. And now it works in every direction and it aims down before diving so you aint flying 3123124miles. Just a perfect range. I added a sexy slomo.
02-27-2011, 08:58 PM #8
Pauly
Banned
Originally posted by xQuZe
Dolphin Dive


Video:
(Looks better as shown.)

You must login or register to view this content.








Code:
    
Dive()
{
self endon("disconnect");
self maps\mp\gametypes\_hud_message::hintMessage("Press [{+breath_sprint}] and [{+stance}] to dive.");
self notifyOnPlayerCommand( "Run", "+breath_sprint" );
self notifyOnPlayerCommand( "Dive", "+stance" );
for(;Winky Winky
{
self waittill( "Run" );
self waittill( "Dive" );
self setPlayerAngles(self.angles + (22, 0, 0));
wait .1;
forward = self getTagOrigin("j_head");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
MaCrosshair = BulletTrace( forward, end, 0, self )[ "position" ];
setDvar("timescale", 0.5 );
wait .01;
self setOrigin(MaCrosshair+(0,0,0));
self SetStance( "prone" );
self freezeControls(true);
wait .2;
setDvar("timescale", 1.0 );
wait .5;
self freezeControls(false);
}
}
vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}


In 1 line:
    Dive(){self endon("disconnect");self maps\mp\gametypes\_hud_message::hintMessage("Press [{+breath_sprint}] and [{+stance}] to dive."); self notifyOnPlayerCommand( "Run", "+breath_sprint" );self notifyOnPlayerCommand( "Dive", "+stance" ); for(;Winky Winky {self waittill( "Run" );self waittill( "Dive" );self setPlayerAngles(self.angles + (22, 0, 0));wait .1;forward = self getTagOrigin("j_head");        end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);        MaCrosshair = BulletTrace( forward, end, 0, self )[ "position" ];setDvar("timescale", 0.5 );wait .01;self setOrigin(MaCrosshair+(0,0,0));self SetStance( "prone" );self freezeControls(true);wait .2;        setDvar("timescale", 1.0 );wait .5;self freezeControls(false);}}vector_scal(vec, scale){        vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);        return vec;}


You Dont Even Really Dive :/
02-27-2011, 08:58 PM #9
xd366
find me on twitter now
Originally posted by xQuZe
Dolphin Dive


Video:
(Looks better as shown.)

You must login or register to view this content.







Code:
    
Dive()
{
self endon("disconnect");
self maps\mp\gametypes\_hud_message::hintMessage("Press [{+breath_sprint}] and [{+stance}] to dive.");
self notifyOnPlayerCommand( "Run", "+breath_sprint" );
self notifyOnPlayerCommand( "Dive", "+stance" );
for(;Winky Winky
{
self waittill( "Run" );
self waittill( "Dive" );
self setPlayerAngles(self.angles + (22, 0, 0));
wait .1;
forward = self getTagOrigin("j_head");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
MaCrosshair = BulletTrace( forward, end, 0, self )[ "position" ];
setDvar("timescale", 0.5 );
wait .01;
self setOrigin(MaCrosshair+(0,0,0));
self SetStance( "prone" );
self freezeControls(true);
wait .2;
setDvar("timescale", 1.0 );
wait .5;
self freezeControls(false);
}
}
vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}


In 1 line:
    Dive(){self endon("disconnect");self maps\mp\gametypes\_hud_message::hintMessage("Press [{+breath_sprint}] and [{+stance}] to dive."); self notifyOnPlayerCommand( "Run", "+breath_sprint" );self notifyOnPlayerCommand( "Dive", "+stance" ); for(;Winky Winky {self waittill( "Run" );self waittill( "Dive" );self setPlayerAngles(self.angles + (22, 0, 0));wait .1;forward = self getTagOrigin("j_head");        end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);        MaCrosshair = BulletTrace( forward, end, 0, self )[ "position" ];setDvar("timescale", 0.5 );wait .01;self setOrigin(MaCrosshair+(0,0,0));self SetStance( "prone" );self freezeControls(true);wait .2;        setDvar("timescale", 1.0 );wait .5;self freezeControls(false);}}vector_scal(vec, scale){        vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);        return vec;}



here you go:

You must login or register to view this content.
02-27-2011, 09:11 PM #10
xQuZe-
You talkin to me?
Originally posted by daboss
do you know if the 360 would be while your standingor in mid dive


Originally posted by PaulyD View Post
You Dont Even Really Dive :/


New Video

Originally posted by NaTo154 View Post
it needs more of a jump before the diving part


Yea you're right, but it's pretty basic lol. I wanted it to be done tonight.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo