rappeling script help
Posted: June 12th, 2011, 5:06 pm
i get a error with the last line b4 the } which says that it is a syntax error
its trying to get a rappeling helicopter to work
Code: Select all
#include maps\_utility;
#include common_scripts\utility;
#include maps\_anim;
#include maps\_vehicle_aianim;
#include maps\orchtest;
#using_animtree ("generic_human");
anim_main()
{
thread blackhawk_anims();
}
#using_animtree( "vehicles" );
blackhawk_anims()
{
level.scr_anim[ "blackhawk" ][ "idle" ][ 0 ] = %blackout_bh_evac_heli_idle;
level.scr_anim[ "blackhawk" ][ "landing" ] = %blackout_bh_evac_heli_land;
level.scr_anim[ "blackhawk" ][ "rotors" ] = %bh_rotors;
level.scr_animtree[ "blackhawk" ] = #animtree;
}
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");
//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 );
}
its trying to get a rappeling helicopter to work