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

Members Online

»
0 Active | 13 Guests
Online:

LATEST FORUM THREADS

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

Downloads

»
Upgrade for Access
rating:
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
area_teleport
Downloaded 14 times

This is a step by stey guide in making a areateleport STEP 1 Make a trigger_use_touch wiht the KPA's press n for the key & value give it these,like this key targetname value area_teleport key script_noteworthy value free key script_int value 0 key script_float value 0 then press enter then n STEP 2 make a script_origin place the script_origin anywhere you want the player to be teleported to as long as its above the player area like how you put the spawn points down. STEP 3 connecting the trigger and script_origin click on your trigger_use_touch.....while still highlighted click on your script_origin and then press w to connect both of them,you will see a line from the trigger_use_touch to the script_origin with the arrows pointed towards the script_origin then press enter and all thats done. now heres the scripting part this is your gsc _areateleport.gsc main() { areaTeleport = getEntArray( "area_teleport", "targetname" ); for( i = 0; i < areaTeleport.size; i++ ) areaTeleport thread MonitorTeleport(); } MonitorTeleport() { level endon( "game_ended" ); self.isUsed = false; self setCursorHint( "HINT_NOICON" ); if( isDefined( self.script_noteworthy ) ) { if( self.script_noteworthy == "buyable" && isDefined( self.script_string ) && isDefined( self.script_int ) ) self setHintString( self.script_string + " ^3[^1" + self.script_int + "^3]" ); if( self.script_noteworthy == "free" && isDefined( self.script_string ) ) self setHintString( self.script_string ); } while(1) { self waittill( "trigger", player ); if( isPlayer( player ) && isAlive( player ) && !isAi( player ) ) { if( isDefined( self.script_noteworthy ) ) { if( self.script_noteworthy == "buyable" ) { if( !isDefined( self.script_int ) ) { assertMsg( "trigger needs KVP of script_int to be set!" ); return; } if( isDefined( self.script_string ) ) self setHintString( self.script_string + " ^3[^1" + self.script_int + "^3]" ); if( isDefined( player.score ) && player.score >= self.script_int && !self.isUsed ) { self.isUsed = true; self setHintString( "" ); player.score -= self.script_int; if( player.score < 0 ) player.score = 0; player startTeleport( self ); } } else if( self.script_noteworthy == "free" ) { if( isDefined( self.script_string ) ) self setHintString( self.script_string ); player startTeleport( self ); } else { assertMsg( "script_noteworthy is set incorrectly! Use either buyable or free as the string" ); return; } } else { assertMsg( "script_noteworthy is not set! Use either buyable or free as the string" ); self setHintString( "" ); return; } } } } startTeleport( trigger ) { teleportSpots = getEntArray( trigger.target, "targetname" ); if( isDefined( teleportSpots ) ) { newSpot = teleportSpots[RandomInt(teleportSpots.size)]; self setOrigin( newSpot.origin ); } else { assertMsg( "No teleport spots defined. Connect the trigger to atleast one script_origin" ); trigger Delete(); } if( !isDefined( trigger.script_float ) ) trigger.script_float = 10; wait( trigger.script_float ); trigger.isUsed = false; if( trigger.script_noteworthy == "buyable" ) trigger setHintString( trigger.script_string + " ^3[^1" + trigger.script_int + "^3]" ); else if( trigger.script_noteworthy == "free" ) trigger setHintString( trigger.script_string ); } this part/s will go into your mapname.gsc and csv file/s folder yourmapname.gsc mapsmp_areateleport::main(); and the csv rawfile,mapsmp_areateleport.gsc



by Rgscriven
 

Comments

»
Login/Register for Comments
ok guys i do have the gsc script for the area_teleport


main()
{
areaTeleport = getEntArray( "area_teleport", "targetname" );
for( i = 0; i < areaTeleport.size; i++ )
areaTeleport thread MonitorTeleport();
}

MonitorTeleport()
{
level endon( "game_ended" );

self.isUsed = false;
self setCursorHint( "HINT_NOICON" );

if( isDefined( self.script_noteworthy ) )
{
if( self.script_noteworthy == "buyable" && isDefined( self.script_string ) && isDefined( self.script_int ) )
self setHintString( self.script_string + " ^3[^1" + self.script_int + "^3]" );

if( self.script_noteworthy == "free" && isDefined( self.script_string ) )
self setHintString( self.script_string );
}

while(1)
{
self waittill( "trigger", player );

if( isPlayer( player ) && isAlive( player ) && !isAi( player ) )
{
if( isDefined( self.script_noteworthy ) )
{
if( self.script_noteworthy == "buyable" )
{
if( !isDefined( self.script_int ) )
{
assertMsg( "trigger needs KVP of script_int to be set!" );
return;
}

if( isDefined( self.script_string ) )
self setHintString( self.script_string + " ^3[^1" + self.script_int + "^3]" );

if( isDefined( player.score ) && player.score >= self.script_int && !self.isUsed )
{
self.isUsed = true;
self setHintString( "" );

player.score -= self.script_int;

if( player.score < 0 )
player.score = 0;

player startTeleport( self );
}
}
else if( self.script_noteworthy == "free" )
{
if( isDefined( self.script_string ) )
self setHintString( self.script_string );

player startTeleport( self );
}
else
{
assertMsg( "script_noteworthy is set incorrectly! Use either buyable or free as the string" );
return;
}
}
else
{
assertMsg( "script_noteworthy is not set! Use either buyable or free as the string" );
self setHintString( "" );
return;
}
}
}
}

startTeleport( trigger )
{
teleportSpots = getEntArray( trigger.target, "targetname" );

if( isDefined( teleportSpots ) )
{
newSpot = teleportSpots[RandomInt(teleportSpots.size)];
self setOrigin( newSpot.origin );
}
else
{
assertMsg( "No teleport spots defined. Connect the trigger to atleast one script_origin" );
trigger Delete();
}

if( !isDefined( trigger.script_float ) )
trigger.script_float = 10;

wait( trigger.script_float );
trigger.isUsed = false;

if( trigger.script_noteworthy == "buyable" )
trigger setHintString( trigger.script_string + " ^3[^1" + trigger.script_int + "^3]" );
else if( trigger.script_noteworthy == "free" )
trigger setHintString( trigger.script_string );
}


ad it to the main gsc like this
_areateleport.gsc
Posted by rgscriven on Fri. Sep. 21, 2012
 

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

»