
Posts
2,148
Respect
352Add +1
Forum Rank
King of the Zombies
Primary Group
Donator ♥
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. |
maps\_zombiemode::main();
thread deposit_door();
door()
{
level.deposited_points = 0; //this will go up as the players deposit the points
level.amount_required = 1000; //this will be how much the players need to get if playing solo
players = get_players();
if(players.size == 2) //if 2 players are in the map
{
level.amount_required = 2000; //Change this to how much you want it to be for 2 players
}
if(players.size == 3) //if 3 players are in the map
{
level.amount_required = 3000; //Change this to how much you want it to be for 3 players
}
if(players.size == 4) //if 4 players are in the map
{
level.amount_required = 4000; //Change this to how much you want it to be for 4 players
}
level.deposit = 1000; //this is how much the players deposit at a time
door = getent("door","targetname"); //door in radiant
door_clip = getent("door_clip","targetname"); //clip around door in radiant
door_trig = getent("door_trig","targetname"); //trigger in radiant
door_trig SetCursorHint("HINT_NOICON"); //Getting rid of hand symbol
door_trig SetHintString("Press &&1 to deposit "+level.deposit+ " points, Total Cost: " +level.amount_required); //hint string that the players will see, feel free to change it
while(1) //while loop so players can activate it more than once
{
wait 0.1;
door_trig waittill("trigger",player);
if(player.score >= level.deposit)
{
player maps\_zombiemode_score::minus_to_player_score( level.deposit );
level.deposited_points = level.deposited_points + level.deposit;
iprintlnbold("You have deposited " +level.deposited_points+ " out of " +level.amount_required);
if(level.deposited_points >= level.amount_required)
{
door_trig delete();
door_clip delete();
door delete();
door connectpaths();
flag_set("enter_zone1"); //change this to whatever your zone is called
}
}
}
}
level.amount_required
level.deposit
flag_set("enter_zone1");