![Smile :)](./images/smilies/icon_smile.gif)
![Very Happy :D](./images/smilies/icon_biggrin.gif)
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
![Image](http://i45.tinypic.com/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
![Smile :)](./images/smilies/icon_smile.gif)
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:
![Image](http://i48.tinypic.com/2dihz41.jpg)
Ok thats the mapping side of it done
![Smile :)](./images/smilies/icon_smile.gif)
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
![Smile :)](./images/smilies/icon_smile.gif)
Code: Select all
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!!
here is a quick video of the finished product (from an old testmap)
http://www.xfire.com/video/2c2cb5/