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

Members Online

»
0 Active | 10 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Tutorials

»
CoD4 Mapping
ratings:
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
How To Create Your Own Start Points ( Singleplayer )
Versions: You must be logged in to view history.

As there is already a tutorial informing us about "Startpoints" their isnt one on how to create it. Though the idea is the same as the one already posted i will try to clarify with ( hopefully ) more details.

The way start points works is that as you are creating your singleplayer map your mission will have different scenes. So it would be then a great idea to have each major scene set up with its own threads. Thus 3 scenes arent in one thread. Then you would just teleport yourself and an ally/allies to an area where that scene would take place and calling in the proper thread to start that new scene. Try and teleport as close as possible to that scene. Why is this important? Because it keeps us from constantly testing everything from the beginning, specially when we just created an entirely new scene and it doesn't waste time as we carry on from our new scene. With that being said let me show you how.

At the beginning of any stock mapname.gsc and before their respective _load::main();, you will see something like this:

Code:

add_start( "nrml", ::normal_start, &"start" );
add_start( "brch", ::first_building_start, &"first_building");
add_start( "dfnd", ::first_building_defend, &"defend");
add_start( "wave", ::second_wave_startpoint, &"ground_defense" );
add_start( "bld2", ::other_bldg_starts, &"get_obj" );

default_start( ::first_building_start );


this is very important as the function "add_start( );" will tell us where we start off in our map. The add_start info goes as follow:

add_start( message, Function, Localized_string );

it will need a message, the thread to call, and a string to display for each particular "add_start" you have. We then decided where we want to start off by calling the function in the

"default_start( ::my_function ); "

Keep in mind that these functions( threads ) will have to be there if you have them in your add_start, and are really only there for developers to test their work.

now heres a very short example of what a normal script would look like as you play the mission:

Code:

main()
{
add_start( "first_scene", ::awesome_start, &"start" );
add_start( "second_scene", ::amazing_action_hack, &"middle_scene" );
add_start( "final_scene", ::final_start_hack, &"final_scene" );

default_start( ::awesome_start );

maps_load::main();
}

awesome_start()
{
.....amazing stuff happens then we move on to the next scene.....

thread amazing_action();
}

amazing_action()
{
.....more stuff to do and we move on to thread 3....

thread final_scene();
}


final_scene()
{
......final stuff and we finish......

}


Very simple right? thread 1, leads to thread2, and then that leads to thread 3. But if we wanted to test the newly added stuff in thread 3 how do we go about? well we would have to change the

default_start( ::function );

to call on one of the other threads. so our default for testing thread3 would be looking like this:

default_start( ::final_start_hack );

which would then call out the thread

"final_start_hack()"

and within this thread we would have the necessary info needed and actions to be performed before we call on the thread

"final_scene()".

So heres what that thread would look like:
Code:

final_start_hack()
{
//if we have any allies in that scene we want to teleport them first before the player.
//the reason why is because they will not teleport if the player can see them. Thus,
//they must be teleported before the player always.

price = getent( "price", "targetname" );
price teleport( ( x, y, z ), ( 0, 90, 0 ) );//teleport( "origin", "angles" ) -- thats how that works.

wait 0.25;

level.player setorigin( ( x, y, z ) );// this is where the player would be moved to
level.player setplayerangles( ( 0, 90, 0 ) );// these are the players new angles when moved there.

waittillframeend;

//call on our thread so we can start our final scene.
thread final_scene();


}



with that being said heres wat the final version of script would look like
Code:

#include maps_utility;

#include common_scriptsutility;

main()
{

add_start( "first_scene", ::awesome_start, &"start" );
add_start( "second_scene", ::amazing_action_hack, &"middle_scene" );
add_start( "final_scene", ::final_start_hack, &"final_scene" );

default_start( ::awesome_start );

maps_load::main();



}

awesome_start()
{

.....amazing stuff happens then we move on to the next scene.....

thread amazing_action();


}

amazing_action()
{

.....more stuff to do and we move on to thread 3....


thread final_scene();

}


final_scene()
{

......final stuff and we finish......

}


/* everything under this line handles our starting points and their respective threads */

amazing_action_hack()
{
//if we have any allies in that scene we want to teleport them first before the player.
//the reason why is because they will not teleport if the player can see them. Thus,
//they must be teleported before the player always.

price = getent( "price", "targetname" );
price teleport( ( x, y, z ), ( 0, 90, 0 ) );

wait 0.25;// wait this much so that we know the ai teleported safely.

level.player setorigin( ( x, y, z ) );//players new location
level.player setplayerangles( ( 0, 90, 0 ) );//players new angles

waittillframeend;

//call on our second thread so we can skip the first scene.
thread amazing_action();

}


final_start_hack()
{
//if we have any allies in that scene we want to teleport them first before the player.
//the reason why is because they will not teleport if the player can see them. Thus,
//they must be teleported before the player always.

price = getent( "price", "targetname" );
price teleport( ( x, y, z ), ( 0, 90, 0 ) );//teleport( "origin", "angles" ) -- thats how that works.

wait 0.25;

level.player setorigin( ( x, y, z ) );
level.player setplayerangles( ( 0, 90, 0 ) );

waittillframeend;

//call on our final thread so we can start from the final scene
thread final_scene();


}


I hope this has cleared up on how to create your own starting points and how to properly use them. If you have any questions about this u can xfire me. My xfire is "voidsource", same as my name.

 

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

»