Modme Forums
Menu:

Window that breaks after 4 shots

Game Modding | Call of Duty: Black Ops 3 | Scripting


ModmeBot:

Thread By: soul-toktzt
Can anyone help me out?
I created a (probably bad one) script with 4 triggers, 3 textures of glass, but all 4 triggers activate at the same time.

function glasswindow_001() {
	stuff_glasswindow_shown0 = GetEnt("glass_window_shown", "targetname");					//glass_clip itself
	stuff_glasswindow_hidden1 = getEnt("glass_window_hidden_broken_1", "targetname");		//first cracked texture
	stuff_glasswindow_hidden2 = getEnt("glass_window_hidden_broken_2", "targetname");		//second cracked texture
	stuff_glasswindow_hidden3 = getEnt("glass_window_hidden_broken_3", "targetname");		//third cracked texture
	stuff_glasswindow_hidden4 = GetEntArray("glass_window_hidden_broken_4", "targetname"); 	//Mantle on texture + cracked glass model around the sides
	glass_window_trigger_001 = GetEnt("glass_window_trigger_001", "targetname");			//first trigger
	glass_window_trigger_002 = GetEnt("glass_window_trigger_002", "targetname");			//second trigger
	glass_window_trigger_003 = GetEnt("glass_window_trigger_003", "targetname");			//third trigger
	glass_window_trigger_004 = GetEnt("glass_window_trigger_004", "targetname");			//fourth trigger
	
	stuff_glasswindow_hidden1 Hide(); 						
	stuff_glasswindow_hidden2 Hide();						
	stuff_glasswindow_hidden3 Hide();						
	for(i=0;i<stuff_glasswindow_hidden4.size;i++) {="" stuff_glasswindow_hidden4[i]="" hide();="" }="" glass_window_trigger_002="" hide();="" glass_window_trigger_003="" hide();="" glass_window_trigger_004="" hide();="" glass_window_trigger_001="" waittill="" ("trigger",="" player);="" stuff_glasswindow_hidden1="" show();="" glass_window_trigger_001="" delete();="" glass_window_trigger_002="" show();="" glass_window_trigger_002="" waittill="" ("trigger",="" player);="" stuff_glasswindow_hidden1="" delete();="" stuff_glasswindow_hidden2="" show();="" glass_window_trigger_002="" delete();="" glass_window_trigger_003="" show();="" glass_window_trigger_003="" waittill="" ("trigger",="" player);="" stuff_glasswindow_hidden2="" delete();="" stuff_glasswindow_hidden3="" show();="" glass_window_trigger_003="" delete();="" glass_window_trigger_004="" show();="" stuff_glasswindow_shown0="" delete();="" glass_window_trigger_004="" waittill="" ("trigger",="" player);="" stuff_glasswindow_hidden3="" delete();="" stuff_glasswindow_hidden4="" show();=""></stuff_glasswindow_hidden4.size;i++)>
I shoot once, all 4 triggers activate, 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.