

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!![]() | 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. |
//================================================================================================
// Script Name : Door That Opens After Power is Activated, Door That Opens After All Three Teleporters Are Linked
// Author : xSanchez78
// Moving Door Help : Gamer9294
// Online Link : http://ugx-mods.com/forum/index.php?topic=4613.0
// Notes : call "maps\power_pap_door::main();" after "maps\_zombiemode::main();" in "mapname.gsc".
//================================================================================================
#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;
main()
{
//make sure to edit this --------------------------
self.power_dr_z = -150; //value = amount of units the door moves on the Z axis. Positive values move the door UP; negative values move the door DOWN.
self.power_dr_x = 0; //value = amount of units the door moves on the X axis. Positive values move the door RIGHT; negative values move the door LEFT.
self.power_dr_y = 0; //value = amount of units the door moves on the Y axis. Positive values move the door FORWARD; negative values move the door BACKWARD.
self.pap_dr_z = -150; //value = amount of units the door moves on the Z axis. Positive values move the door UP; negative values move the door DOWN.
self.pap_dr_x = 0; //value = amount of units the door moves on the X axis. Positive values move the door RIGHT; negative values move the door LEFT.
self.pap_dr_y = 0; //value = amount of units the door moves on the Y axis. Positive values move the door FORWARD; negative values move the door BACKWARD.
//don't edit this ---------------------------------
thread power_door();
thread pap_door();
}
power_door()
{
hintstring_trigger1 = getEnt("power_door1_hintstring", "targetname");
hintstring_trigger1 UseTriggerRequireLookat();
hintstring_trigger1 setCursorHint( "HINT_NOICON" );
hintstring_trigger1 sethintstring( "Power must be activated first" ); //hintstring text to notify player of what needs to occur for the door to open
flag_wait("electricity_on");
wait 1;
hintstring_trigger1 delete();
players = get_players();
for( i = 0; i < players.size; i++ )
{
players[i] playsound("door_slide_open");
}
power_door1 = getEnt("power_door1", "targetname");
power_door1 notsolid();
power_door1 moveZ( self.power_dr_z, 2);
power_door1 moveX( self.power_dr_x, 2);
power_door1 moveY( self.power_dr_y, 2);
wait 2.2;
power_door1 delete();
}
pap_door()
{
hintstring_trigger1 = getEnt("pap_door1_hintstring", "targetname");
hintstring_trigger1 UseTriggerRequireLookat();
hintstring_trigger1 setCursorHint( "HINT_NOICON" );
hintstring_trigger1 sethintstring( "All Three Teleporters Must Be Linked First" ); //hintstring text to notify player of what needs to occur for the door to open
flag_wait( "teleporter_pad_link_3" );
wait 1;
hintstring_trigger1 delete();
players = get_players();
for( i = 0; i < players.size; i++ )
{
players[i] playsound("door_slide_open");
}
pap_door1 = getEnt("pap_door1", "targetname");
pap_door1 notsolid();
pap_door1 moveZ( self.pap_dr_z, 2);
pap_door1 moveX( self.pap_dr_x, 2);
pap_door1 moveY( self.pap_dr_y, 2);
wait 2.2;
pap_door1 delete();
}