Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Trigger Bug

  1. #11
    Private
    Join Date
    Feb 2013
    Posts
    27
    Thanks
    7
    Thanked 12 Times in 5 Posts
    a cant upload as attachment coz zip is too large so I uploaded other site, here is the link include the script and the .d3dbsp http://www.speedyshare.com/6r8BN/KF-BioticsLab.zip

  2. #12
    Private
    Join Date
    Jan 2013
    Location
    Hungary
    Posts
    113
    Thanks
    10
    Thanked 74 Times in 45 Posts
    Use this windows and scripts:
    https://dl.dropbox.com/u/9715219/z_break.iwd

    I have made and tried at now, it works fine.

  3. The Following User Says Thank You to randall For This Useful Post:

    kung foo man (8th February 2013)

  4. #13
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Add me on xfire: imbackagainiba

    Your mapping shows really great potential. Your scripting doesnt though, but id like to help on such an awesome map!

  5. The Following User Says Thank You to IzNoGoD For This Useful Post:

    kung foo man (8th February 2013)

  6. #14
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    you should try this instead of renaming every trigger and its pair on your own:

    >new map
    >create a trigger_damage > targetname = "trigger_glass"
    >create your unbroken window > make it a scrpt_brushmodel
    >create your broken window > make it a scrpt_brushmodel
    >firstly select your trigger > secondly select your unbroken window > hit [W] to connect them (line poining from the trigger to the window should appear)
    >unselect all [i]
    >firstly select your unbroken > secondly select your broken window > hit [W] to connect them (again a line poining from the unbroken window to the broken one should be visible)
    >save it as a prefab

    now you can add this prefab whereever you want and how often you want in your map script (without renaming):

    Code:
    init()
    {
    	glassTriggers = getEntArray( "trigger_glass" , "targetname" );
    
    	if( isDefined( glassTriggers ) && glassTriggers.size )
    	{
    		for( i = 0 ; i < glassTriggers.size ; i++ )
    		{
    			if( isDefined( glassTriggers[i] ) )
    				glassTriggers[i] thread monitorGlassTrigger();
    			else
    				iPrintLn( "undefined glassTrigger found for some reason!" );
    		}
    	}
    	else
    	{
    		iPrintLn( "NO glassTriggers FOUND IN MAP!" );
    	}
    }
    
    monitorGlassTrigger()
    {
    	window = undefined;
    
    	if( isDefined( self.target ) )
    	{
    		window = getEnt( self.target , "targetname" );
    	}
    
    	if( !isDefined( window ) )
    	{
    		iPrintLn( "GlassTrigger at " + self.origin + " has no window as target!" );
    
    		return;
    	}
    
    	broken = undefined;
    
    	if( isDefined( window.target ) )
    	{
    		broken = getEnt( window.target , "targetname" );
    	}
    	
    	if( !isDefined( window ) )
    	{
    		iPrintLn( "window at " + window.origin + " has no broken window as target!" );
    	}
    
    	window show();
    	broken hide();
    
    	trigger waittill( "trigger" );
    
    	trigger delete();
    	window delete();
    	broken show();
    }
    i think izno may help you with the scripting abit more^^

    anyway, your better with using prefabs instead of naming every trigger / window pair by hand..

  7. The Following User Says Thank You to serthy For This Useful Post:

    kung foo man (8th February 2013)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •