Posts
78
Respect
16Add +1
Forum Rank
Rotting Walker
Primary Group
Member
Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!
main() {
thread shake();
//your other code
}
shake()
{
for(;;){
earthquake(0.2,5,(0,0,0),1400); //0.4 - setting for force shaking (0.3 is default)
//5 - the duration of the shaking of the earth
// (in seconds is 10)
//1400 - radius of the earthquake
wait(RandomFloatRange(5,45)); //default 20,300
wait(5);
}
}


![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
trigger_logic()
{
Self waittill( "trigger", player );
// what do do here
}![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
Self waittill( "trigger", player ); Playfx( fx, origin ); if { ..... }


![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. |
![]() Oil Rig Beta Access |

init()
{
level._effect[ "DUST" ] = Loadfx( "..." );
trigger = getent( "tunnel_trig", "targetname" ); // get the correct trigger
earthquake_org = getstruct( "tunnel_quake", "targetname" ); // use a SCRIPT_STRUCT for the center of the earthquake
dust_org = getstructarray( "tunnel_dust", "targetname" ); // use one or more SCRIPT_STRUCT's for the fx origin(s)
level.tunnel_shake = false;
level thread tunnel_stuff(trigger);
level thread shake(earthquake_org);
level thread dust(dust_org);
}
tunnel_stuff(trigger)
{
while(1)
{
count = 0;
players = get_players();
for( i=0 ; i<players.size ; i++ )
{
if( players[i] istouching( trigger ) ) // count all players touching the trigger, if at least one is touching it activate the stuff
{
count++;
break;
}
}
if( count > 0 && level.tunnel_shake == false )
{
level.tunnel_shake = true;
}
else if( count == 0 && level.tunnel_shake == true )
{
level.tunnel_shake = false;
}
wait 0.5;
}
}
shake(earthquake_org)
{
while(1)
{
if( level.tunnel_shake == true )
{
earthquake(0.2,5,earthquake_org.origin,1400);
wait(RandomFloatRange(5,45));
wait(5);
}
wait 0.5;
}
}
dust(dust_org)
{
while(1)
{
if( level.tunnel_shake == true )
{
for( i=0 ; i<dust_org.size ; i++ )
{
playfx( level._effect["DUST"], dust_org[i].origin );
}
wait(5); // match the time of your fx here to loop it correctly
}
wait 0.1;
if( level.tunnel_shake == false )
wait 0.5;
}
}
maps\GSC_FILENAME::init();



