Toward the end of my map, all of the items my STR references, doubles. It's really weird and I keep looking over my script and have no idea why it does that.
Enlarge image
Enlarge image
Code:
/*-----------------------
RESCUE CHOPPER
-------------------------*/
misc()
{
wait 22;
flag_set( "heli_lands" );
}
node_stuff()
{
level.heli_trig = getent( "heli_trig", "script_noteworthy" );
level.heli_trig waittill( "trigger" );
wait 3;
level.evac_chopper = getent( "evac_chopper", "targetname" );
assertex( isdefined( level.evac_chopper ), "heli is not there" );
if( !isdefined( level.evac_chopper ) )
return;
thread heli_stuff();
thread misc();
thread seaknight();
level.aaron playsound("evac_pilot");
}
heli_stuff()
{
s_col = getent( "seaknight_collision", "targetname" );
s_col linkto( level.evac_chopper, "tag_origin", (0,0,0), (0,0,0) );
s_dt = getent( "seaknight_death_trig", "targetname" );
s_dt thread manual_linkto( level.evac_chopper, (0,0,0) );
s_dt thread heli_squashes_stuff( "heli_lands" );
}
seaknight()
{
seaknight_path = getent( "seaknight_path", "targetname" );
seaknight_land_location = getent( "seaknight_land_location", "script_noteworthy" );
assert( isdefined( level.seaknight ) );
wait 0.05;
//seaknightRiders = level.seaknight.riders;
//assert( seaknightRiders.size == 1 );
seaknight_land_location waittill( "trigger", helicopter );
helicopter.dontDisconnectPaths = true;
helicopter vehicle_detachfrompath();
helicopter vehicle_land();
helicopter setHoverParams( 0, 0, 0 );
helicopter thread seaknight_doors_open();
thread obj10_movement();
thread objective_10();
//getent( "player_in_seaknight", "targetname" ) waittill( "trigger" );
}
seaknight_doors_open()
{
animpos = maps\_vehicle_aianim::anim_pos( self, 1 );
self thread maps\_vehicle_aianim::setanimrestart_once( animpos.vehicle_getoutanim, animpos.vehicle_getoutanim_clear );
thread maps\_utility::play_sound_in_space( animpos.vehicle_getoutsound, self.origin );
}
/*-----------------------
OBJECTIVE 10
-------------------------*/
objective_10()
{
obj10 = getent("obj10", "targetname");
objective_add(10, "active", &"RECOVER_OBJ10",getent("obj10", "targetname").origin);
objective_current(10);
obj10 waittill("trigger");
objective_state(10, "done");
obj10 delete();
wait(4);
level.dylan playsound("helluva");
wait(5);
credits();
}
obj10_movement()
{
level.aaron playsound("get_chopper");
node_aaron09 = getnode("node_aaron09","targetname");
level.aaron setgoalnode(node_aaron09);
level.aaron waittill("goal");
node_dylan09 = getnode("node_dylan09","targetname");
level.dylan setgoalnode(node_dylan09);
level.dylan waittill("goal");
wait(1);
node_jon02 = getnode("node_jon02","targetname");
level.jon setgoalnode(node_jon02);
level.jon waittill("goal");
node_sonny02 = getnode("node_sonny02","targetname");
level.sonny setgoalnode(node_sonny02);
level.sonny waittill("goal");
node_eric02 = getnode("node_eric02","targetname");
level.eric setgoalnode(node_eric02);
level.eric waittill("goal");
}
/*-----------------------
END CREDITS
-------------------------*/
credits()
{
lines = [];
lines[ lines.size ] = &"RECOVER_CREDIT1";
lines[ lines.size ] = &"RECOVER_CREDIT2";
maps\_introscreen::introscreen_feed_lines( lines );
wait(0.5);
black_overlay = create_overlay_element( "white", 0 );
black_overlay fadeOverTime( 3 );
wait(6);
Changelevel( "" );
}
I think the issue is something within the OBJECTIVE 10 section. When I take that out, it seems fine. The error in that first pic came from another part of the script:
Code:
******* script runtime error *******
unknown sound alias 'seaknight_door_open': (file 'maps/_utility.gsc', line 2268)
org playsound( alias, "sounddone" );
*
Error: called from:
(file 'maps/recover.gsc', line 559)
thread maps\_utility::play_sound_in_space( animpos.vehicle_getoutsound, self.origin );
*
Error: called from:
(file 'maps/recover.gsc', line 546)
helicopter thread seaknight_doors_open();
*
Error: started from:
(file 'maps/_vehicle.gsc', line 4076)
self waittill( "goal" );
*
Error: ************************************