Sign in to follow this  
Followers 0

Earthquake machine


Description

earthquake machine :) its pretty simple but im sure some less advanced mappers / scripters will like it :D

http://www.codjumper.com/forums/viewtopic.php?t=12446&f=30


firstly, to make it look good put a model in your map such as icbm_electronic_cabinet7, where you
want the earthquake machine to go and put a "clip" brush around it to make it solid.

then you need to creat a trigger around it. so create a trigger brush and then with the trigger selected
right click on your 2d grid >>> trigger >>> use_touch

then with the trigger brush still selected, press N to bring up the following values and enter these:

key: Targetname
value: earthquake

key: hintstring
value: ^2Press ^3&&1 ^2to cause an earthquake

like this

34ifjmc.jpg

now you just need to place 2 origins in your map, one is going to be for the sound, and one is going to
be for where the earthquake is actually gonna come from :)

so right click on your 2d grid >>> script >>> origin and place it roughly in the center of your map
and enter this value:

key: targetname
value: quake

and now create another origin and place it next to the previous one and enter these values:

key: targetname
value: sound

should look like this:

2dihz41.jpg

Ok thats the mapping side of it done :) now for the scripting >:)

the scripting for this if im honest is pretty easy. here is an example gsc with the scriptin it, i will
also explain the script and what vairables you can change :)

main()
{
   maps\mp\_load::main();
   
   ambientPlay("ambient_backlot_ext");
   
   game["allies"] = "sas";
   game["axis"] = "opfor";
   game["attackers"] = "axis";
   game["defenders"] = "allies";
   game["allies_soldiertype"] = "woodland";
   game["axis_soldiertype"] = "woodland";
   
   setdvar( "r_specularcolorscale", "1" );
   
   setdvar("r_glowbloomintensity0",".25");
   setdvar("r_glowbloomintensity1",".25");
   setdvar("r_glowskybleedintensity0",".3");
   setdvar("compassmaxrange","1800");
             
   thread quake();
}



quake()

{
trigger = getent("earthquake","targetname"); // this finds the entity you created (the trigger)
quake = getent("quake","targetname");      // this finds the entity you created (the origin named quke)
sound = getent("sound","targetname");      // this finds the entity you created (the origin named sound)
while (1)

   {
   trigger waittill ("trigger",user);
   wait 1;
   iprintlnbold( "EAARRTHHHQUUAAKKE!!!");    //prints inbold "EAARRTHHHQUUAAKKE!!!" to all the users on the map, feel free to change the text :)
   sound PlaySound( "elm_quake_sub_rumble");  //plays the sound of an earthquake at the origin "sound"
   Earthquake( 0.7, 8, quake.origin, 10000 ); // (magnitude of the earthquake, length, at what origin, and the radius) these values can be changed apart from the origin
   wait 2;
   }
} 

compile, buildd fast files and earthquake away!!




0 Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

Mega Footer

You can configure this content inside your ACP under Customization > Edit > IPSFocus Mega Footer.

Mega Footer

You can configure this content inside your ACP under Customization > Edit > IPSFocus Mega Footer.

Mega Footer

You can configure this content inside your ACP under Customization > Edit > IPSFocus Mega Footer.

Mega Footer

You can configure this content inside your ACP under Customization > Edit > IPSFocus Mega Footer.