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

Members Online

»
0 Active | 82 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

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 4
Category: CoD4 Scripting
Scripting and coding with Call of Duty 4.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Strange error I've never seen before: STR lines double in game toward the end
infinet
General Member
Since: Feb 4, 2008
Posts: 208
Last: Jan 23, 2013
[view latest posts]
Level 4
Category: CoD4 Scripting
Posted: Thursday, Jan. 21, 2010 05:47 am
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: ************************************
Share |
infinet
General Member
Since: Feb 4, 2008
Posts: 208
Last: Jan 23, 2013
[view latest posts]
Level 4
Category: CoD4 Scripting
Posted: Thursday, Jan. 21, 2010 08:24 pm
Fixed; sorta. Still dont know why it did what it did, so I just monkeyed around with arranging where I call obj10. I just put a wait command.

Code:

	thread seaknight();
	
	level.aaron playsound("evac_pilot");
	wait(30);
	thread obj10_movement();
	thread objective_10();



Seems to work and not call double on STR. Still werid that it did it in the first place
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 Scripting

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

»