Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 63 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Tutorials

»
CoD4 Mapping
ratings:
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
Rappelling
Versions: You must be logged in to view history.

This tutorial will show you how to do rappelling in cod4. sam_fisher3000 will tell you only rappelling stuff. The rest is for you to figure out.

First off, Thanx to BabyCop's Downtown map. I got the code from his source file. He deserves some credits since I got the codes inspired by him.

Following void_source way of saying things.

Assuming you know basic scripting. -without basic, how can you do advance. :D

Assuming you know more advanced scripting. -so you can know rappelling.

Assuming you know how to work with radiant.

Assuming you know how to construct a building for rappelling. -important especially for realism.

Assuming you know about animations. -important b/c you need to know how the mapname_anim.gsc file works. 

Assuming you know how to create a basic map. -important b/c if you don't know how, how can you make rappelling. 

Assuming you know how to edit the zone file and compiling the fast file. -everyone should know

 

Beginners, don't try this at home, unless, you know all of the above. 

I am saying these b/c I don't want to post a whole gsc script and telling you what codes should be in your gsc file, like _load::main(), etc. And #include maps\_utility; And this way saves time.

The scripting will be purely on rappelling.

 

In radiant, make sure you have a pathnode.

Key: targetname

Value: player_rappel_node

 

Place the node near or on the floor of the roof. Make sure, there is a ledge in front of the node. This way, in-game, the rope will have a u shape. The rope is on the floor but is also on the ledge, this way, it will look realistic. Make sure you create a trigger.

 

Key: targetname

Value: rappel_trigger

 

Place it near the node so it looks realistic. Once you trigger it, you get on the rope. If you place far it wouldn't look realistic b/c you will move to the rope. 

You're done with radiant!

 

Scripting time!

player_rappel()
{

node = getnode( "player_rappel_node", "targetname" );
rope = spawn_anim_model( "player_rope" ); //spawns animation
node thread anim_first_frame_solo( rope, "rappel_for_player" );
rope_glow = spawn_anim_model( "player_rope_obj" );
node thread anim_first_frame_solo( rope_glow, "rappel_for_player" );
rope_glow hide(); //need to place somewhere else b/c it doesn't hide. Leave if you like.
model = spawn_anim_model( "player_rig" );
model hide(); //place somewhere else too. Leave if you like.
node anim_first_frame_solo( model, "rappel" );
rappel_trigger = getent( "rappel_trigger", "targetname" );
rappel_trigger trigger_on(); //activates the trigger
rope_glow show();
rappel_trigger sethintstring( &"SCRIPT_PLATFORM_HINTSTR_RAPPEL" );
rappel_trigger waittill( "trigger" ); //after this, you can have some music
rope_glow hide();
rappel_trigger delete();
level.player allowprone( false ); //sets some stuff, so it is realistic. Unless you're James Bond. HAHA!
level.player allowcrouch( false ); //same
level.player disableweapons(); //same, if you wanna be James Bond, leave it on, but it looks weird. Not tested. I know it looks weird, who has weapons in hand while rappelling.
model lerp_player_view_to_tag( "tag_player", 0.5, 0.9, 35, 35, 45, 0 );
node thread anim_single_solo( model, "rappel" );
node thread anim_single_solo( rope, "rappel_for_player" );
node waittill( "rappel" );
level.player unlink(); //you get off.
model delete();
level.player enableweapons();
level.player allowprone( true );
level.player allowcrouch( true );
}

 

This script is from the sniperescape mission. You can use the blackout script as well but I find this more easier to understand. Also I will like to thanx the forum on this topic. (rappelling sound) Also I got this from BabyCop's Homefront: Downtown map. Kudos to him and I am giving him credits for this. 

 

All right, you need a anim script. 

#include maps\_anim;
#using_animtree("generic_human");
main()
{


thread player_rappel();
script_models();
}


#using_animtree( "player" );
player_rappel()
{

level.scr_animtree["player_rig"]                 =    #animtree;   
level.scr_model["player_rig"]                     =     "viewhands_player_sas_woodland";
level.scr_anim["player_rig"]["rappel"]                =     %sniper_escape_player_rappel;
   
}

#using_animtree( "script_model" );
script_models()
{
       
level.scr_animtree["rope"]                     =     #animtree;
level.scr_model["rope"]                         =     "rappelrope100_ri";
level.scr_anim["player_rope"]["rappel_for_player"]        =     %sniper_escape_player_start_rappelrope100;
level.scr_animtree["player_rope"]                 =     #animtree;
level.scr_model["player_rope"]                     =     "rappelrope100_le";
level.scr_anim[ "rope" ][ "rappel_end" ]            =     %sniper_escape_rappel_finish_rappelrope100;
level.scr_anim[ "rope" ][ "rappel_start" ]            =    %blackout_rappel_start_rappelrope100;
level.scr_anim[ "rope" ][ "rappel_idle" ][ 0 ]            =     %sniper_escape_rappel_idle_rappelrope100;
level.scr_anim[ "player_rope_obj" ][ "rappel_for_player" ]    =    %sniper_escape_player_start_rappelrope100;
level.scr_animtree[ "player_rope_obj" ]             =     #animtree;
level.scr_model[ "player_rope_obj" ]                 =     "rappelrope100_le_obj";

}

 

I assume you understand the script. If not, then just use it. It works. Also edit your zone file. There will be stuff you need.

 

Zone file:

rawfile,animtrees/script_model.atr
xmodel,viewhands_player_sas_woodland
rawfile,maps/yourmapname_anim.gsc
xanim,sniper_escape_player_rappel
xanim,blackout_rappel_start_rappelrope100
xanim,sniper_escape_player_start_rappelrope100
xanim,sniper_escape_rappel_idle_rappelrope100
xanim,sniper_escape_rappel_finish_rappelrope100
xanim,blackout_bh_evac_player
xmodel,rappelrope100_ri
xmodel,rappelrope100_le
xmodel,rappelrope100_le_obj

 

Hope this helps. It is best if you understand how rappelling works then it makes your time more worthwhile b/c you know what you're doing and you know how rappelling works! The sound for rappelling, I have no idea where the sounds are. I checked the sound folders but they aren't there. Create some custom sounds if you want. Hope this guide will help out anyone with scripting and mapping skills. 

 

sam_fisher3000

 

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»