UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

how to add zombies in spaceland style buyable doors to your map

broken avatar :(
Created 7 years ago
by AllMoDs
0 Members and 1 Guest are viewing this topic.
2,149 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 22 September 2015
Last active: 6 days ago
Posts
256
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
My Contact & Social Links
More
Signature
×
AllMoDs's Groups

and yes each player can give money for the door

step 1   add a normal buyable  door remember the  target name // for this tut we will call it [2nd use_trigger]

if you need help with step 1
https://confluence.ugx-mods.com/display/UGXMODS/Creating+a+Debris+Blocker

step 2    add a script_brushmodel give it a targetname and give it the clip texture //   for this tut we will call it [2nd use_trigger cliping blocking the way]

step 3   put the step 2  script_brushmodel right behind the step one door trigger needs to look something like this

 
your  script_brushmodel  from step 2 only needs to block the way to the new unopened area

step 4
    make a new trigger_use give it a targetname  for this tut we will call it [1st use_trigger]

step 5   make a 2nd script_brushmodel  give it a targetname and give it the clip texture  for this tut we will call it [1st use_trigger cliping blocking last dore triger]

step 6   take step 5s script_brushmodel and cover  step 1s trigger so the player cant touch it like this

as you see the triger is behind the script_brushmodel now the player cant use yet

step 7  now take the step 4 trigger and put right in front of step 5s script_brushmodel  like this



step 8
compile your map

step 9  make a new gsc put in mods/your mapname/maps put this in the gsc and save it


Spoiler: click to open...
#include maps\_utility;
#include common_scripts\utility;
#include maps\_zombiemode_utility;

init()
{
   
   level.rock_door1 = 1;
   
   rock_door_triggers = GetEntArray( "rock_door11", "targetname" ); // 1st use_trigger
   array_thread( rock_door_triggers, ::buy_door1 );
   
   
   rock_door_triggers22 = GetEntArray( "zombie_debris_bock", "targetname" ); // 1st use_trigger cliping blocking last dore triger
   array_thread( rock_door_triggers22, ::buy_door12 );
   
   rock_door_triggers44 = GetEntArray( "zombie_debris", "targetname" ); // 2nd use_trigger
   array_thread( rock_door_triggers44, ::buy_door2 );
   
   rock_door_triggers55 = GetEntArray( "zombie_debris_bock2", "targetname" ); // 2nd use_trigger cliping blocking the way
   array_thread( rock_door_triggers55, ::buy_door3 );
   

}

buy_door1()
{
    flag_wait( "all_players_connected" );
   self setHintString("Press & hold &&1 to donate 1000 out of [4000]");  // 1st door price
   self waittill("trigger", player);
    cost = 999;
   for (;;)
    {
      if (player.score > cost && level.rock_door1 == 1)
      {
         player playsound("cash_register");
         player maps\_zombiemode_score::minus_to_player_score(1000); //1st door price money taken
         level.rock_door1 = 2;
         continue;
      }
      
      ////////////////////////////////////////////////////////////////
      if (level.rock_door1 == 2)
      {
         self setHintString("Press & hold &&1 to donate 1000 out of [3000]"); // 2nd door price
         self waittill("trigger", player);
         if (player.score > cost)
         {
            
            player playsound("cash_register");
            player maps\_zombiemode_score::minus_to_player_score(1000); //2nd door price money taken
            level.rock_door1 = 3;
            continue;
         }
      }
      ////////////////////////////////////////////////////////////////////
      if (level.rock_door1 == 3)
      {
         self setHintString("Press & hold &&1 to donate 1000 out of [2000]"); // 3rd door price
         self waittill("trigger", player);
         if (player.score > cost)
         {
            
            player playsound("cash_register");
            player maps\_zombiemode_score::minus_to_player_score(1000); //3rd door price money taken
            level notify( "rockdoor_dun" );
            self delete();
         }
         
      }
      
    }
}

buy_door12()
{
   level waittill( "rockdoor_dun" ); // 1st clipping to delate
   self delete();
   
}
buy_door2()
{
   self setHintString("Press & hold &&1 to donate 1000 [Out Of:  1000]");  //last door price
   self waittill("trigger", player);
   level notify( "rockdoor2_dun" );
}
buy_door3()
{
   level waittill( "rockdoor2_dun" ); // 2nd clipping to delate
   self delete();
}

if you like to add sound on each money added change sound name "cash_register" here to your custom named sound
Spoiler: click to open...
player playsound("cash_register");

step 10   change all the target names in the gsc you just made to your target names you made where i said for this tut we will call it [    ] in the gsc you will see what i put inside of here in each step above  [   ]  match that up with the part in the gsc where // are chang that targetname for that step


Spoiler: click to open...
GetEntArray( "whatever steps target name here ", "targetname" );

step 11 if you dont have all ready put this _zombiemode_perks.gsc in your mods/your mapname/maps add
Spoiler: click to open...
level thread maps\new gsc name::init();
under
 level.packa_jingle = 0;
dont forget to chane where i put "new gsc name " with the gsc name you just made



the setHintString in this buy_door2() the money is taken buy what you set in step one so chage all  setHintString  to what you want and this is what takes the money from the player
player maps\_zombiemode_score::minus_to_player_score(1000); 
make changes as you like where the 1000 is all notes in the gsc you just made to help out build your mod now your all dun 


if you use please give me cred ty

if you have problems post here and ill help you
Last Edit: January 29, 2017, 05:59:32 pm by AllMoDs
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 22 September 2015
Last active: 6 days ago
Posts
256
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
My Contact & Social Links
More
×
AllMoDs's Groups
if you used b4 this post re get step 9 had a bug its fixed now step 9 is the gsc

 
Loading ...