Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function shootable_trigs()
- {
- level.shootable_door_count = 0;
- trigs = GetEntArray( "shootable_door", "targetname" );
- level.shootable_door_goal = trigs.size;
- foreach( trig in trigs )
- trig thread wait_for_shoot();
- }
- function wait_for_shoot()
- {
- self waittill( "trigger", player );
- player PlayLocalSound( "zmb_cha_ching" ); // Change this to any sound alias you want
- model = GetEnt( self.target, "targetname" );
- level.shootable_door_count++;
- if( level.shootable_door_count == level.shootable_door_goal )
- self open_door();
- }
- function open_door()
- {
- doors = GetEntArray( "shootable_door_reward", "targetname" );
- foreach( door in doors )
- door PlaySound( "zmb_cha_ching" );
- wait(0.05);
- foreach( door in doors )
- door delete();
- flag = doors[0].script_flag;
- level flag::set( flag );
- }
- 2) At the top of your mapname.gsc add the following code
Advertisement
Add Comment
Please, Sign In to add comment