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

Members Online

»
0 Active | 73 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
New/updated fast rope tutorial
Versions: You must be logged in to view history.

For some reason, the edit for the original tutorial did not go through, so I have just decided to create a new one. I will use Pablo's tutorial as reference. His is needed for the first couple of steps. To ensure everything is working, please disregard his scripts.

I have been working on fast roping for a few days now. The current tutorial by Pablo is missing a few important aspects that's preventing fast roping from working. Some of us have encountered that the player does not spawn in the helicopter, which just goes to show, the whole tutorial does not work. I will use pablo's tutorial as a reference. It's not easy for me to add on to his tutorial so I will recreate the fast rope tutorial but use his as references. Please disregard his scripts to ensure the fast rope works properly.

Here is his tut: Here

Do step 1-4 from his tutorial.

For step 3 for the trigger, give it a targetname. To keep it simple, give it the value of heli_trigger. So the key is targetname and the value is heli_trigger. Make sure the trigger and helicopter have the same move vehicle and spawn vehicle key/value. So select the trigger and the helicopter and press shift+V. Then select spawn vehicle and move vehicle.

Step 4 is the important aspect. Pablo is missing a few details. The AI must have script_drone/1.

Key: script_drone
Value: 1

So the AI is now a script_drone. However, after fast roping, they are no longer drones, they become regular AI. The script_drone is only needed for the AI in the helicopter with the player. If the AI is in another helicopter, there is no need.

When giving them a starting position, the startingposition of 3,

Key: script_startingposition
Value: 3

This is a drone needed for the fast roping to work. This AI does not exist, meaning this actor does not fast rope or show up in game. So if you want an actor to exist, create another actor and give it script_startingposition/7. 7 is very common to use. So basically, you need an actor with script_startingposition 3 in order for the fast roping work. This one is needed in script.

Now on to scripting.

Code:

#include common_scriptsutility;

#include maps_utility;

#include maps_anim;

#include maps_vehicle_aianim;


main()
{
	maps_blackhawk::main( "vehicle_blackhawk" ); //spawn the helicopter. You can use any blackhawk model. You may be able to use the mi17 or enemy helicopter.
	maps_drone::init(); //for spawning your drones.

	default_start( ::ride_start ); 
	precachemodel( "fastrope_arms" );
	precachemodel( "vehicle_blackhawk" );
	
	maps_load::main();
	
   
	
	//mapsmapname_anim::main();	//load the animation file thread
}

//below is configuring your player and fast roping scripts. Just copy and paste.

loadplayer( position, animfudgetime )
{
	if ( getdvar( "fastrope_arms" ) == "" )
		setdvar( "fastrope_arms", "0" );
	if ( !isdefined( animfudgetime ) )
		animfudgetime = 0; 
	assert( isdefined( self.riders ) );
	guy = undefined; 
	for ( i = 0; i < self.riders.size; i++ )
	{
		if ( self.riders[ i ].pos == position )
		{
			guy = self.riders[ i ]; 
			guy.drone_delete_on_unload = true; 
			guy.playerpiggyback = true; 
			break; 
		}
	}
	assertex( !isai( guy ), "guy in position of player needs to have script_drone set, use script_startingposition ans script drone in your map" );
	assert( isdefined( guy ) );
	animpos = maps_vehicle_aianim::anim_pos( self, position );
	guy notify( "newanim" );
	guy detachall();
	guy setmodel( "fastrope_arms" );
	guy useanimtree( animpos.player_animtree );
	thread maps_vehicle_aianim::guy_idle( guy, position );	
	level.player playerlinktodelta( guy, "tag_player", 1.0, 60, 28, 30, 30, true ); //can change this to have a 360 view.
	level.player freezecontrols(false);	
	guy hide();
	animtime = getanimlength( animpos.getout );
	animtime -= animfudgetime; 
	self waittill( "unload" );
	if ( getdvar( "fastrope_arms" ) != "0" )
		guy show();
	level.player disableweapons();
	guy notsolid();
	wait animtime; 
	level.player unlink();
	level.player enableweapons();
	wait 35;
    level.player_heli delete();	
}

ride_start()

{
 heli_trigger = getent( "heli_trigger", "targetname" ); //the trigger to spawn the helicopter
 heli_trigger notify ( "trigger" );
 level.player_heli = maps_vehicle::waittill_vehiclespawn_noteworthy( "players_helicopter" ); //helicopter name/defining the helicopter
 level.player_heli thread mapsmapname_anim::player_heli_ropeanimoverride(); //load the anim file thread
 level.player_heli thread loadplayer( 3 ); //this is what I was talking about. This is the drone. 
}

Now onto the anim file.

Code:

#include maps_utility;

#include common_scriptsutility;

#include maps_anim;

#include maps_vehicle_aianim;

#include mapsmapname;  //the map name of the original script file


#using_animtree ("generic_human");

#using_animtree ("vehicles");

player_heli_ropeanimoverride()
{
	tag = "TAG_FastRope_RI";
	model = "rope_test_ri";
	snipeanim = %armada_blackhawk_sniper_idle_fastrope80;
	idleanim = %armada_blackhawk_sniper_idle_loop_fastrope80;
	dropanim = %armada_blackhawk_sniper_drop_fastrope80;
	
	array = [];
	array[ "TAG_FastRope_RI" ] = spawnstruct();
	self.attach_model_override = array;  // gets rid of blackhawks standard fastrope stuff for this rig

	rope = spawn("script_model", level.player.origin);
	rope setmodel (model);
	rope linkto (self, tag, (0,0,0),(0,0,0));
	rope useanimtree (#animtree);

	
//	flag_wait ("snipefromheli");
	//self notify ("groupedanimevent","snipe");  //tells the ai to snipe.
	//maps_vehicle_aianim::animontag( rope, tag, snipeanim );
	thread player_heli_ropeanimoverride_idle( rope, tag, idleanim );
	self waittill ("unload");
	level.player thread play_loop_sound_on_entity("fastrope_loop_plr");
	thread maps_vehicle_aianim::animontag( rope, tag, dropanim );
	wait getanimlength( dropanim ) - .2;
	level.player stop_loop_sound_on_entity("fastrope_loop_plr");
 	rope unlink();
 	level.player thread play_sound_on_entity("fastrope_end_plr");
	wait 10;
	rope delete();  // possibly do something to delete when the player is not looking at it.	
}

player_heli_ropeanimoverride_idle( guy, tag, animation )
{
	self endon ("unload");
	while(1)
		maps_vehicle_aianim::animontag( guy, tag, animation );
}



Some stuff you don't need and can remove. Read through the script and you would see which you don't need like the sniper. You don't have to though because they are already have the // beside them.


I got this script from a tutorial source file. I can share it but I am not sure. May need some permission from admin if I can share something that doesn't belong to me. I can't ask the tutorial person b/c I don't know him/her. I may give the source file that I made but I would need to fix something up, like beautify the map. So, if I can upload the original tutorial source file, that would be great, if not, I would upload my version.


Anyways, the tutorial that I wrote should work. It is very simple and it worked for me without problems. Basically, Pablo forgot to mention that the AI need script_drone, which is very important. The main script for the fast rope is changed a bit.

Credit goes to the original tutorial maker and Pablo. Thanks to both of them!

If you have any problem, don't be afraid to ask.



Have fun!

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

»