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

Members Online

»
0 Active | 109 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: World at War
Category: CoDWW SP Mapping
Call of Duty: World at War single player mapping, scripting and everything single player.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Scripting an Intro
IWRevolver
General Member
Since: Jul 11, 2007
Posts: 191
Last: Oct 1, 2012
[view latest posts]
Level 4
Category: CoDWW SP Mapping
Posted: Thursday, Feb. 10, 2011 06:13 am
So for my SP map I just have a basic objective setup and it is working. Before I move on, I want to get the intro down pat-( the black screen with the noted date, location, and name of the character)

Here is my sample GSC I am using for the basic objective- this works as is. The problem I am having is noted under the .gsc

/*
UTILITIES FIRST
*/
#include maps\_music;
#include maps\_utility;
#include maps\_anim;
#include common_scripts\utility;
#using_animtree ("generic_human");
main()
{

maps\_load::main();
// maps\cherbourg_anim::main();
maps\cherbourg_fx::main();

// precache any models used in your objectives here
// precacheModel("weapon_explosives");
// the players are in the level, now we can thread to our first objective
thread obj1();
}


obj1()
{
obj1 = getent("obj1", "targetname");

objective_add(1, "active", &"cherbourg_CLEAROUT",getent("obj1","targetname").origin);

objective_current(1);

obj1 waittill("trigger");

objective_state(1, "done");

obj1 delete();

wait(2);

iprintlnbold (&"cherbourg_OBJ_COMPLETED"); //Lets the player know the objective is complete

}

CodMapper was nice enough to share with me some basic information on what to add in order to get the intro screen working. However when I add the information to my GSC I get a { bad snyntax error and cannot figure out where the problem is starting. Here is the entire GSC with the added intro code. Any help of where the grammer error is coming from or what I could be doing better within the script to better organize the GSC would be greatly appreciated!

Thanks guys!

/*
Lets sort out our utilities first
*/
#include maps\_music;
#include maps\_utility;
#include maps\_anim;
#include common_scripts\utility;
#using_animtree ("generic_human");
main()
{

maps\_load::main();
// maps\cherbourg_anim::main();
maps\cherbourg_fx::main();

// precache any models used in your objectives here
// precacheModel("weapon_explosives");
custom_introscreen( STRING1, string2, string3, string4, string5 )
{
/#
if( GetDvar( "introscreen" ) == "0" )
{
wait( 0.05 );
waittillframeend;
level notify( "finished final intro screen fadein" );
waittillframeend;
flag_set( "starting final intro screen fadeout" );
waittillframeend;
level notify( "controls_active" ); // Notify when player controls have been restored
waittillframeend;
flag_set( "introscreen_complete" ); // Do final notify when player controls have been restored
flag_set( "pullup_weapon" );
return;
}

if( level.start_point != "default" )
{
return;
}
#/

level.introblack = NewHudElem();
level.introblack.x = 0;
level.introblack.y = 0;
level.introblack.horzAlign = "fullscreen";
level.introblack.vertAlign = "fullscreen";
level.introblack.foreground = true;
level.introblack SetShader( "black", 640, 480 );

flag_wait( "all_players_connected" );

// SCRIPTER_MOD
// MikeD( 3/16/200 ): Freeze all of the players controls
// level.player FreezeControls( true );
freezecontrols_all( true );

// MikeD( 11/14/2007 ): Used for freezing controls on players who connect during the introscreen
level._introscreen = true;
wait( 0.05 );

level.introstring = [];
//Title of level
if( IsDefined( STRING1 ) )
{
maps\_introscreen::introscreen_create_line( STRING1, "lower_left", 1.75 );
}

wait( 2 );

level thread set_all_players_double_vision( 5, 0.05 );
level thread set_all_players_blur( 2, 0.05 );
if( IsDefined( string2 ) )
{
maps\_introscreen::introscreen_create_line( string2, "lower_left", 1.75 );
}

if( IsDefined( string3 ) )
{
maps\_introscreen::introscreen_create_line( string3, "lower_left", 1.75 );
}

level thread set_all_players_shock( "mak_intro", 6 );
if( IsDefined( string4 ) )
{
wait( 2 );
maps\_introscreen::introscreen_create_line( string4, "lower_left", 1.75 );
}

if( IsDefined( string5 ) )
{
wait( 2 );
maps\_introscreen::introscreen_create_line( string5, "lower_left", 1.75 );
}
level notify( "finished final intro screen fadein" );

wait( 2 );

// Fade out black
level.introblack FadeOverTime( 0.5 );
level.introblack.alpha = 0;

flag_set( "starting final intro screen fadeout" );
// Only restore controls if we have blood
if( is_mature() )
{
// Restore player controls part way through the fade in
freezecontrols_all( false );
}

level._introscreen = false;

level notify( "controls_active" ); // Notify when player controls have been restored

// Fade out text
level thread maps\_introscreen::introscreen_fadeOutText();

flag_set( "introscreen_complete" ); // Notify when complete

// Extra Blur stuff.
level thread set_all_players_double_vision( 0, 2 );
level thread set_all_players_blur( 0, 2 );

wait( 4.5 );

// Get dizzy again
level thread set_all_players_shock( "mak_intro", 3 );
level thread set_all_players_double_vision( 3, 2 );
level thread set_all_players_blur( 1, 2 );

wait( 2.25 );

// Ok, now focus
level thread set_all_players_double_vision( 0, 3 );
level thread set_all_players_blur( 0, 3.25 );
}

// the players are in the level, now we can thread to our first objective
thread obj1();
}


obj1()
{
obj1 = getent("obj1", "targetname");

objective_add(1, "active", &"cherbourg_CLEAROUT",getent("obj1","targetname").origin);

objective_current(1);

obj1 waittill("trigger");

objective_state(1, "done");

obj1 delete();

wait(2);

iprintlnbold (&"cherbourg_OBJ_COMPLETED"); //Let player know he is done
}
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty: World at War : CoDWW SP Mapping

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

»