Post: Rappelling in Highrise?
02-07-2011, 03:46 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); I was looking through the mp_highrise ff file and noticed this code.
    SetupRappel()
{
// Press and hold ^3[{+activate}]^7 to rappel
//precacheString( &"MP_PRESS_TO_RAPPEL" );
trigs = getentarray( "rappeltrigger", "targetname" );
foreach ( trig in trigs )
{
org = getent( trig.target, "targetname" );
trig.rappelPoint = org.origin;
trig.dir = anglesToForward( org.angles );
org delete();
trig thread RappelThink();
}
foreach ( trig in trigs )
{
org = getent( trig.target, "targetname" );
if ( isdefined( org ) )
org delete();
}
}

RappelThink()
{
// Press and hold ^3[{+activate}]^7 to rappel
//self setHintString( &"MP_PRESS_TO_RAPPEL" );

while ( 1 )
{
self waittill( "trigger", player );
if ( !isPlayer( player ) )
continue;

if ( !player isOnGround() )
continue;

if ( isdefined( player.rapelling ) )
continue;

player thread Rappel( self );
}
}

Rappel( trig )
{
toRappelPoint = trig.rappelPoint - self.origin;
rappelPoint = self.origin + vectordot( toRappelPoint, trig.dir ) * trig.dir;
rappelPoint = ( rappelPoint[ 0 ], rappelPoint[ 1 ], trig.rappelPoint[ 2 ] );

upTime = .5;// sec
overTime = .75;// sec
downSpeed = 512;// units / sec

upPoint = self.origin;
upPoint = ( upPoint[ 0 ], upPoint[ 1 ], rappelPoint[ 2 ] );
overPoint = rappelPoint + trig.dir * 20;
tracePosition = playerPhysicsTrace( overPoint, overPoint + ( 0, 0, -10000 ), false, self );
downPoint = tracePosition + ( 0, 0, 16 );

org = spawn( "script_origin", self.origin );
org hide();

self.rapelling = true;
self _disableWeapon();
self linkto( org );
self PlayerLinkedOffsetEnable();

org moveto( upPoint, upTime, 0, 0 );
org waittill( "movedone" );
org moveto( overPoint, overTime, 0, 0 );
org waittill( "movedone" );

downTime = distance( overPoint, downPoint ) / downSpeed;

org moveto( downPoint, downTime, 0, 0 );
org waittill( "movedone" );

self _enableWeapon();
self unlink();
org delete();

self.rapelling = undefined;
}


Is it possible that you can use this?
(adsbygoogle = window.adsbygoogle || []).push({});

The following 3 users say thank you to PrOJenkz for this useful post:

Alfa, FourzerotwoFAILS, Nero.
02-07-2011, 05:54 AM #29
-Bane-
Bane Does Work. Like Me.
Originally posted by austinr00 View Post
lol yeah someone work on this lol i might give it a go


k. i found some coordinates and some more code that should have been in this thread to begin with.
ill bold the coordinates. which, there isnt much but it something to start with.


main()
{
maps\mp\mp_highrise_precache::main();
maps\createart\mp_highrise_art::main();
maps\mp\mp_highrise_fx::main();
maps\mp\_explosive_barrels::main();
maps\mp\_load::main();

maps\mp\_compass::setupMiniMap( "compass_map_mp_highrise" );

setdvar( "r_lightGridEnableTweaks", 1 );
setdvar( "r_lightGridIntensity", 1.11 );
setdvar( "r_lightGridContrast", .9 );

VisionSetNaked( "mp_highrise" );
ambientPlay( "embient_mp_highrise" );

game[ "attackers" ] = "axis";
game[ "defenders" ] = "allies";

// raise up planes to avoid them flying through buildings
level.airstrikeHeightScale = 3;

setdvar( "compassmaxrange", "2100" );
//thread Elevator( "elev1" );
//thread Elevator( "elev2" );
//thread Elevator( "elev3" );
//thread Elevator( "elev4" );

//thread SetupRappel();
}

SetupRappel()
{
// Press and hold ^3[{+activate}]^7 to rappel
//precacheString( &"MP_PRESS_TO_RAPPEL" );
trigs = getentarray( "rappeltrigger", "targetname" );
foreach ( trig in trigs )
{
org = getent( trig.target, "targetname" );
trig.rappelPoint = org.origin;
trig.dir = anglesToForward( org.angles );
org delete();
trig thread RappelThink();
}
foreach ( trig in trigs )
{
org = getent( trig.target, "targetname" );
if ( isdefined( org ) )
org delete();
}
}

RappelThink()
{
// Press and hold ^3[{+activate}]^7 to rappel
//self setHintString( &"MP_PRESS_TO_RAPPEL" );

while ( 1 )
{
self waittill( "trigger", player );
if ( !isPlayer( player ) )
continue;

if ( !player isOnGround() )
continue;

if ( isdefined( player.rapelling ) )
continue;

player thread Rappel( self );
}
}

Rappel( trig )
{
toRappelPoint = trig.rappelPoint - self.origin;
rappelPoint = self.origin + vectordot( toRappelPoint, trig.dir ) * trig.dir;
rappelPoint = ( rappelPoint[ 0 ], rappelPoint[ 1 ], trig.rappelPoint[ 2 ] );

upTime = .5;// sec
overTime = .75;// sec
downSpeed = 512;// units / sec

upPoint = self.origin;
upPoint = ( upPoint[ 0 ], upPoint[ 1 ], rappelPoint[ 2 ] );
overPoint = rappelPoint + trig.dir * 20;
tracePosition = playerPhysicsTrace( overPoint, overPoint + ( 0, 0, -10000 ), false, self );
downPoint = tracePosition + ( 0, 0, 16 );

org = spawn( "script_origin", self.origin );
org hide();

self.rapelling = true;
self _disableWeapon();
self linkto( org );
self PlayerLinkedOffsetEnable();

org moveto( upPoint, upTime, 0, 0 );
org waittill( "movedone" );
org moveto( overPoint, overTime, 0, 0 );
org waittill( "movedone" );

downTime = distance( overPoint, downPoint ) / downSpeed;

org moveto( downPoint, downTime, 0, 0 );
org waittill( "movedone" );

self _enableWeapon();
self unlink();
org delete();

self.rapelling = undefined;
}


where it sais
"etHintString"
we've got to find that.

btw, it has something to do with going from from one elevator to another and a building grappel aswell.
02-07-2011, 06:02 AM #30
Originally posted by cutznbruzez97 View Post
k. i found some coordinates and some more code that should have been in this thread to begin with.
ill bold the coordinates. which, there isnt much but it something to start with.


main()
{
maps\mp\mp_highrise_precache::main();
maps\createart\mp_highrise_art::main();
maps\mp\mp_highrise_fx::main();
maps\mp\_explosive_barrels::main();
maps\mp\_load::main();

maps\mp\_compass::setupMiniMap( "compass_map_mp_highrise" );

setdvar( "r_lightGridEnableTweaks", 1 );
setdvar( "r_lightGridIntensity", 1.11 );
setdvar( "r_lightGridContrast", .9 );

VisionSetNaked( "mp_highrise" );
ambientPlay( "embient_mp_highrise" );

game[ "attackers" ] = "axis";
game[ "defenders" ] = "allies";

// raise up planes to avoid them flying through buildings
level.airstrikeHeightScale = 3;

setdvar( "compassmaxrange", "2100" );
//thread Elevator( "elev1" );
//thread Elevator( "elev2" );
//thread Elevator( "elev3" );
//thread Elevator( "elev4" );

//thread SetupRappel();
}

SetupRappel()
{
// Press and hold ^3[{+activate}]^7 to rappel
//precacheString( &"MP_PRESS_TO_RAPPEL" );
trigs = getentarray( "rappeltrigger", "targetname" );
foreach ( trig in trigs )
{
org = getent( trig.target, "targetname" );
trig.rappelPoint = org.origin;
trig.dir = anglesToForward( org.angles );
org delete();
trig thread RappelThink();
}
foreach ( trig in trigs )
{
org = getent( trig.target, "targetname" );
if ( isdefined( org ) )
org delete();
}
}

RappelThink()
{
// Press and hold ^3[{+activate}]^7 to rappel
//self setHintString( &"MP_PRESS_TO_RAPPEL" );

while ( 1 )
{
self waittill( "trigger", player );
if ( !isPlayer( player ) )
continue;

if ( !player isOnGround() )
continue;

if ( isdefined( player.rapelling ) )
continue;

player thread Rappel( self );
}
}

Rappel( trig )
{
toRappelPoint = trig.rappelPoint - self.origin;
rappelPoint = self.origin + vectordot( toRappelPoint, trig.dir ) * trig.dir;
rappelPoint = ( rappelPoint[ 0 ], rappelPoint[ 1 ], trig.rappelPoint[ 2 ] );

upTime = .5;// sec
overTime = .75;// sec
downSpeed = 512;// units / sec

upPoint = self.origin;
upPoint = ( upPoint[ 0 ], upPoint[ 1 ], rappelPoint[ 2 ] );
overPoint = rappelPoint + trig.dir * 20;
tracePosition = playerPhysicsTrace( overPoint, overPoint + ( 0, 0, -10000 ), false, self );
downPoint = tracePosition + ( 0, 0, 16 );

org = spawn( "script_origin", self.origin );
org hide();

self.rapelling = true;
self _disableWeapon();
self linkto( org );
self PlayerLinkedOffsetEnable();

org moveto( upPoint, upTime, 0, 0 );
org waittill( "movedone" );
org moveto( overPoint, overTime, 0, 0 );
org waittill( "movedone" );

downTime = distance( overPoint, downPoint ) / downSpeed;

org moveto( downPoint, downTime, 0, 0 );
org waittill( "movedone" );

self _enableWeapon();
self unlink();
org delete();

self.rapelling = undefined;
}


where it sais
"etHintString"
we've got to find that.

btw, it has something to do with going from from one elevator to another and a building grappel aswell.


Hmm. Nice Find. It would be so cool to rappel down from a building or something.
02-07-2011, 07:56 AM #31
Originally posted by cutznbruzez97 View Post
k. i found some coordinates and some more code that should have been in this thread to begin with.
ill bold the coordinates. which, there isnt much but it something to start with.


main()
{
maps\mp\mp_highrise_precache::main();
maps\createart\mp_highrise_art::main();
maps\mp\mp_highrise_fx::main();
maps\mp\_explosive_barrels::main();
maps\mp\_load::main();

maps\mp\_compass::setupMiniMap( "compass_map_mp_highrise" );

setdvar( "r_lightGridEnableTweaks", 1 );
setdvar( "r_lightGridIntensity", 1.11 );
setdvar( "r_lightGridContrast", .9 );

VisionSetNaked( "mp_highrise" );
ambientPlay( "embient_mp_highrise" );

game[ "attackers" ] = "axis";
game[ "defenders" ] = "allies";

// raise up planes to avoid them flying through buildings
level.airstrikeHeightScale = 3;

setdvar( "compassmaxrange", "2100" );
//thread Elevator( "elev1" );
//thread Elevator( "elev2" );
//thread Elevator( "elev3" );
//thread Elevator( "elev4" );

//thread SetupRappel();
}

SetupRappel()
{
// Press and hold ^3[{+activate}]^7 to rappel
//precacheString( &"MP_PRESS_TO_RAPPEL" );
trigs = getentarray( "rappeltrigger", "targetname" );
foreach ( trig in trigs )
{
org = getent( trig.target, "targetname" );
trig.rappelPoint = org.origin;
trig.dir = anglesToForward( org.angles );
org delete();
trig thread RappelThink();
}
foreach ( trig in trigs )
{
org = getent( trig.target, "targetname" );
if ( isdefined( org ) )
org delete();
}
}

RappelThink()
{
// Press and hold ^3[{+activate}]^7 to rappel
//self setHintString( &"MP_PRESS_TO_RAPPEL" );

while ( 1 )
{
self waittill( "trigger", player );
if ( !isPlayer( player ) )
continue;

if ( !player isOnGround() )
continue;

if ( isdefined( player.rapelling ) )
continue;

player thread Rappel( self );
}
}

Rappel( trig )
{
toRappelPoint = trig.rappelPoint - self.origin;
rappelPoint = self.origin + vectordot( toRappelPoint, trig.dir ) * trig.dir;
rappelPoint = ( rappelPoint[ 0 ], rappelPoint[ 1 ], trig.rappelPoint[ 2 ] );

upTime = .5;// sec
overTime = .75;// sec
downSpeed = 512;// units / sec

upPoint = self.origin;
upPoint = ( upPoint[ 0 ], upPoint[ 1 ], rappelPoint[ 2 ] );
overPoint = rappelPoint + trig.dir * 20;
tracePosition = playerPhysicsTrace( overPoint, overPoint + ( 0, 0, -10000 ), false, self );
downPoint = tracePosition + ( 0, 0, 16 );

org = spawn( "script_origin", self.origin );
org hide();

self.rapelling = true;
self _disableWeapon();
self linkto( org );
self PlayerLinkedOffsetEnable();

org moveto( upPoint, upTime, 0, 0 );
org waittill( "movedone" );
org moveto( overPoint, overTime, 0, 0 );
org waittill( "movedone" );

downTime = distance( overPoint, downPoint ) / downSpeed;

org moveto( downPoint, downTime, 0, 0 );
org waittill( "movedone" );

self _enableWeapon();
self unlink();
org delete();

self.rapelling = undefined;
}


where it sais
"etHintString"
we've got to find that.

btw, it has something to do with going from from one elevator to another and a building grappel aswell.


This code looks perfectly fine, but i don't think its a problem with the code but with how it worked, most likely it was introduced very late into development and it was a cool idea but required to much time to bug test it, like with the two weapons that never made it into Der Riese. The most likely cut it, but i have a semi good idea, ask the dumb ass FourZeroTwo.
02-07-2011, 09:27 AM #32
juddylovespizza
I'VE GOT JUNGLE FEVER
Its like the tank killstreak, there is no animation in multiplayer for this ether so good look getting it to work :P
02-07-2011, 04:49 PM #33
Originally posted by Juddy View Post
Its like the tank killstreak, there is no animation in multiplayer for this ether so good look getting it to work :P


I am sure someone will find use of this code.
02-07-2011, 06:40 PM #34
juddylovespizza
I'VE GOT JUNGLE FEVER
Originally posted by PrOJenkz View Post
I am sure someone will find use of this code.


brilliant comment.
02-08-2011, 12:11 AM #35
Alfa
Banned
Originally posted by PrOJenkz View Post
Aw. It would have been a great find. But wait, if it didnt give a unknown function then maybe we need to find a code to spawn a rappel?


bro look at the coding the rappel is invisible because they changed the code into a comment and when ur beside it its supossed to say Press and Hole [ ] to rappel but they made it a comment too so take away the comments and then try and look for it
02-08-2011, 06:19 AM #36
pcfreak30
>> PCFreak30.com Happy<<
Well, game development is both scripting and design. You need game models and elements, along with the physical properties of it. You also need the scripting to make it function. Obviously the scripting is there, but the models/animations are not.

BTW seems TreyArch took this and put it in the first BO DLC. Oh and what is with everyone dick riding elite mossy and derektrotter. They are not the only expert coders around here.

FYI, the ironic thing is my RL name is Derrick :P.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo