UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - codmoddd1234

A trigger (cpu desk papers etc) to start round 1

Make a trigger use:
kvp:
Code Snippet
Plaintext
targetname   start_rounds

In your mod/mapname/ugxmod/zombiemode.gsc
Go to the round_start() function
 
Under round_start
insert this code:
Code Snippet
Plaintext
activate_trig = getent ("start_rounds", "targetname"); 
activate_trig waittill ("trigger");
11 years ago
all credit goes to the mapper CodMapper and Seelow for making me want to know how he did it.

this blurs your vision and changes your stance while the level starts for 30 seconds
should be timed with fx and some sound.

instructions
1)
copy and paste
Code Snippet
Plaintext
maps\startcrash::init();
under
Code Snippet
Plaintext
zombiemode::main();
in your mapname gsc

2)
in zombiemode.gsc in ugxmod in mod folder directly under the entry round_start() around line 1757 (use notepad++)
copy and paste
Code Snippet
Plaintext
wait ( 25 );
where it says
Code Snippet
Plaintext
wait (5);
this will start the round start,your vision, and ugx smoothly
otherwise rounds count up while your downed.

Paste the following into a blank .gsc. include it into your mod/mapname /maps folder and rename startcrash.gsc

Code Snippet
Plaintext
#include common_scripts\utility; 
#include maps\_utility;
#include maps\_zombiemode_utility;
#include maps\_zombiemode;

init()
{
players = get_players();
for(i=0;i<players.size;i++)
{
level.player0 = players[0];
if(isdefined(players[1]))
{
level.player1 = players[1];
}
if(isdefined(players[2]))
{
level.player2 = players[2];
}
if(isdefined(players[3]))
{
level.player3 = players[3];
}
}
overlay = newHudElem();
overlay.x = 0;
overlay.y = 0;
overlay setshader( "black", 640, 480 );
overlay.alignX = "left";
overlay.alignY = "top";
overlay.horzAlign = "fullscreen";
overlay.vertAlign = "fullscreen";
overlay.alpha = 0;
overlay.sort = 1;

overlay fadeOverlay( .5, 1, 2 );


wait .5;

overlay fadeOverlay( .5, .3, 2 );

ground_ref_ent = spawn( "script_model", level.player0.origin );

level.player0 playerSetGroundReferenceEnt( ground_ref_ent );
level.player0 AllowProne ( true );
level.player0 SetStance( "prone" );
level.player0 Allowcrouch ( false );
level.player0 Allowstand ( false );

if(isdefined(level.player1))
{
level.player1 playerSetGroundReferenceEnt( ground_ref_ent );
level.player1 AllowProne ( true );
level.player1 SetStance( "prone" );
level.player1 Allowcrouch ( false );
level.player1 Allowstand ( false );
}
if(isdefined(level.player2))
{
level.player2 playerSetGroundReferenceEnt( ground_ref_ent );
level.player2 AllowProne ( true );
level.player2 SetStance( "prone" );
level.player2 Allowcrouch ( false );
level.player2 Allowstand ( false );
}

if(isdefined(level.player3))
{
level.player3 playerSetGroundReferenceEnt( ground_ref_ent );
level.player3 AllowProne ( true );
level.player3 SetStance( "prone" );
level.player3 Allowcrouch ( false );
level.player3 Allowstand ( false );
}

x = randomintrange( 5, 15 );
y = randomintrange( 5, 15 );
z = randomintrange( 5, 15 );

ground_ref_ent rotateto( ( x, y, z ), 3 );

wait 3;

ground_ref_ent rotateto( ( ( x * -1 ) , ( y * -1 ), ( z * -1 ) ), 2 );

wait 2;

x = randomintrange( 5, 15 );
y = randomintrange( 5, 15 );
z = randomintrange( 5, 15 );

ground_ref_ent rotateto( ( x, y, z ), 3 );

wait 3;

overlay fadeOverlay( 2, 1, 4);

wait 2;

overlay fadeOverlay( 1, .5, 4);

ground_ref_ent rotateto( ( ( x * -1 ) , ( y * -1 ), ( z * -1 ) ), 3 );

wait 3;

ground_ref_ent rotateto( ( 0, 0, 0 ), 2 );

wait 2;

level.player0 unlink();
level.player0 AllowStand ( true );
level.player0 AllowCrouch ( true );
level.player0 enableWeapons();
level.player0 maps\_zombiemode_score::set_player_score_hud( true );

if(isdefined(level.player1))
{
level.player1 unlink();
level.player1 AllowStand ( true );
level.player1 AllowCrouch ( true );
level.player1 enableWeapons();
level.player1 maps\_zombiemode_score::set_player_score_hud( true );
}
if(isdefined(level.player2))
{
level.player2 unlink();
level.player2 AllowStand ( true );
level.player2 AllowCrouch ( true );
level.player2 enableWeapons();
level.player2 maps\_zombiemode_score::set_player_score_hud( true );
}
if(isdefined(level.player3))
{
level.player3 unlink();
level.player3 AllowStand ( true );
level.player3 AllowCrouch ( true );
level.player3 enableWeapons();
level.player3 maps\_zombiemode_score::set_player_score_hud( true );
}

overlay fadeOverlay( 1, .2, 4);
overlay restoreVision( 6, 0 );
}

fadeOverlay( duration, alpha, blur )
{
self fadeOverTime( duration );
self.alpha = alpha;
get_players()[0] setblur( blur, duration );
wait duration;
}

restoreVision( duration, blur )
{
self fadeOverlay( duration, 0, blur );
}

11 years ago
i didn't write any of these scripts i just explained how to use them

Code Snippet
Plaintext
thread randomstartmessage();
under 
Code Snippet
Plaintext
zombiemode::main();
......in mapname.gsc
then paste this at the bottom of your mapanme gsc
from zct originally//
Code Snippet
Plaintext
randomstartmessage()
{
flag_wait( "all_players_connected" );
/*
      one of these "^" / add a number "3"/ and a letter "r" like "^3r"/ this will make the letter "r" yellow.
*/
phrase = [];
phrase[0] = "your random message";
phrase[1] = "ran^3dom altmessage";
phrase[2] = "???";
phrase[3] = "???";
phrase[4] = "";
//phrase[5] = "random 5"
/*
Colors
^1 = red
^2 = green
^3 = yellow
^4 = Blue
^5 = light blue
^6 = Purple (pink)
^7 = white
^8 = random
^0 = black
*/

color = [];
color[0] = "^1";
color[1] = "^2";
color[2] = "^3";
color[3] = "^4";
color[4] = "^5";


i = RandomInt(phrase.size);
j = RandomInt(color.size);

iPrintLnBold( color[j] , phrase[i] );
}
11 years ago
/*
1)
include the entry at the very bottom of these instructions a blank gsc and rename the gsc rotate
copy and paste
Code Snippet
Plaintext
maps\rotate::main();
under
Code Snippet
Plaintext
zombiemode::main();
in your mapname gsc

include the rotate  gsc in your mod /yourmapname /maps folder

2)
for a single object make brush right click with it selected and make it a script brush model
give it  these kvps
 kvp
Code Snippet
Plaintext
 targetname: rotate 
script_noteworthy: x or y or z (only 1)
speed 1 (1 is slow 5 is normal)


For multiple parts around a "fake center"

make all brushes for your moving piece

make another brush 8 by 8 square

place in the exact "fake" center of where you want all your brushes for whatever your making to rotate around

click only the (8 by 8) brush and select texture origin

with this origin brush(8 by 8) selected select the rest of the objects you want to rotate

right click and make a script brushmodel

click one part of it and give it these kvps (it will automatically give the kvps to the rest of the brushes that you made a
script brush model at the same time

Code Snippet
Plaintext
targetname:rotate
script_noteworthy:x, y, or z
. (only 1)

*/
This is the rotate.gsc. I have no idea where it came from originally

Code Snippet
Plaintext
main()
{
  rotate_obj = getentarray("rotate","targetname");
  if(isdefined(rotate_obj))
  {
   for(i=0;i<rotate_obj.size;i++)
   {
    rotate_obj[i] thread ra_rotate();
   }
  }
}
 
ra_rotate()
{
  if (!isdefined(self.speed))
   self.speed = 10;
  if (!isdefined(self.script_noteworthy))
   self.script_noteworthy = "z";
 
  while(true)
  {
  // rotateYaw(float rot, float time, <float acceleration_time>, <float deceleration_time>);
   if (self.script_noteworthy == "z")
    self rotateYaw(-360,self.speed);
   else if (self.script_noteworthy == "x")
    self rotateRoll(-360,self.speed);
   else if (self.script_noteworthy == "y")
    self rotatePitch(-360,self.speed);
    wait ((self.speed)-0.1); // removes the slight hesitation that waittill("rotatedone"); gives.
  // self waittill("rotatedone");
  }
}

/*
post if you need help
*/
11 years ago
1)
radiant..
make pipe or box select it right click script brushmodel in radiant
kvps
Code Snippet
Plaintext
targetname:pipe_shootable
Code Snippet
Plaintext
script_noteworthy:steam or water or fire (only one)
pipes with a cap on the ends need to be selected and right click entity, ungroup( this ungroups funcgroup/capped cylinders) before they can be made script brushmodels
2)
add:
Code Snippet
Plaintext
maps\_pipes::main();
under   
Code Snippet
Plaintext
maps\_zombiemode::main();
in your mapname gsc
like this
Code Snippet
Plaintext
maps\_zombiemode::main();
maps\_pipes::main();
3)
copy and paste raw/maps/_pipes.gsc to your mod/mapname/map folder.
4)
in ugxeasyfx.gsc user additions section
//paste:
Code Snippet
Plaintext
level._effect["steam"]		= loadFX("impacts/fx_pipe_steam");
//for steam
level._effect["water"] = loadFX("impacts/fx_pipe_water");
//for water
level._effect["fire"] = loadFX("impacts/fx_pipe_fire");
//for fire
5)
in Launcher/ modbuilder fastfile mod .csv
add:   
Code Snippet
Plaintext
fx,impacts/fx_pipe_steam
fx,impacts/fx_pipe_water
fx,impacts/fx_pipe_fire
fx,env/fire/fx_fire_barrel_pm
fx,env/fire/fx_pipe_explosion64
fx,env/fire/fx_pipe_explosion128

check pipes.gsc in modbuilder
compile level
this includes a few fx and you might hit a limit with ugx some custom fx and the jukebox combined

post if you have problems
11 years ago
Loading ...