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
Printable View
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
Use this windows and scripts:
https://dl.dropbox.com/u/9715219/z_break.iwd
I have made and tried at now, it works fine.
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!
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):
i think izno may help you with the scripting abit more^^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();
}
anyway, your better with using prefabs instead of naming every trigger / window pair by hand..