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

Help with a way to open a door

broken avatar :(
Created 7 years ago
by Pine96
0 Members and 1 Guest are viewing this topic.
1,126 views
broken avatar :(
×
broken avatar :(
Location: gb
Date Registered: 16 April 2017
Last active: 7 years ago
Posts
5
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
Pine96's Groups
Pine96's Contact & Social Links
Im not sure how it's done but I was wanting to make a door that opens once you shoot 3 teddy bears.
Like on the Nuketown 1986 to open pap and the buyable ending.
Also was wondering if there was a way to rotate a door when buying it.
Im a pretty big noob when i comes to these things so sorry if i dont understand fully
broken avatar :(
×
broken avatar :(
Location: br
Date Registered: 7 May 2015
Last active: 1 month ago
Posts
312
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
Signature
×
EmpGeneral's Groups
EmpGeneral's Contact & Social LinksldraweEletricStorm
Sliding door:https://www.youtube.com/watch?v=mqxo7uXtUQM

Teddy bear script:

Code Snippet
Plaintext
#include maps\_music;
#include common_scripts\utility;
#include maps\_zombiemode_utility;
#include maps\_utility;

main()
{
self.song = "mx_eggs1"; //valid sound
self.teddy_num = 0;
thread teddy_1();
thread teddy_2();
thread teddy_3();
}

teddy_1()
{
teddy1 = getEnt("teddy1","targetname");
teddy1 SetCursorHint( "HINT_NOICON" );
teddy1 waittill( "trigger", player );
teddy1 Delete();

self.teddy_num = self.teddy_num + 1;

player playsound("meteor_affirm");

thread song_ee();
}

teddy_2()
{
teddy2 = getEnt("teddy2","targetname");
teddy2 SetCursorHint( "HINT_NOICON" );
teddy2 waittill( "trigger", player );
teddy2 Delete();

self.teddy_num = self.teddy_num + 1;

player playsound("meteor_affirm");
thread song_ee();
}

teddy_3()
{
teddy3 = getEnt("teddy3","targetname");
teddy3 SetCursorHint( "HINT_NOICON" );
teddy3 waittill( "trigger", player );
teddy3 Delete();

self.teddy_num = self.teddy_num + 1;

player playsound("meteor_affirm");
thread song_ee();
}

song_ee()
{
if(self.teddy_num == 3)
{
players = get_players();
for( k = 0; k < players.size; k++ )
players[k] playsound(self.song);
}
}

I'm using this to play my music EE song,just change the reward to a door

 
Loading ...