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

Window that "breaks" after 4 shots

broken avatar :(
Created 7 years ago
by soul-toktzt
0 Members and 1 Guest are viewing this topic.
1,625 views
broken avatar :(
×
broken avatar :(
Location: be
Date Registered: 11 April 2016
Last active: 7 years ago
Posts
5
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
soul-toktzt's Groups
soul-toktzt's Contact & Social Links
Hey everyone,
Can someone help me out a bit?

I created a (probably bad) script with 4 triggers, 3 textures of glass, but all 4 triggers activate at the same time.

https://pastebin.com/2H0CN3kT

I shoot once, all 4 triggers activate, even when i hide the other 3 triggers, it'll go straight to the mantle_on + glass models.
I'd like to have it so that when you shoot once, first texture shows up, shoot again, first one disappears, second apears, etc.
broken avatar :(
×
broken avatar :(
Location: caCanada, Eh
Date Registered: 24 November 2016
Last active: 6 years ago
Posts
85
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
×
MegaMech43's Groups
MegaMech43's Contact & Social Linksmegamechmegamech.net
Use one trigger and count how many times it is activated.

Code Snippet
Plaintext
level thread blah()

counter = 0;
function blah() {
  trigger = GetEnt("hint1", "targetname");
  trigger SetHintString("Hold ^3&&1^7 to purchase Shield Part Hint #1 [Cost: 1500]");
  trigger SetCursorHint("HINT_NOICON");
  trigger waittill("trigger", player);

  counter++
  if (counter <= 1) {
    do stuff
  }
  else if (counter == 2) {
    do stuff
  }
  else if (counter == 3) {
    do stuff
  }
  else if (counter >= 4) {
    break_glass();
    counter = 0;
    disable_trigger();
  }
}

Last Edit: May 19, 2017, 06:09:06 am by MegaMech43

 
Loading ...