Easy Breakable Glass / Wood
Moderator: Core Staff
Easy Breakable Glass / Wood
Hello
Im looking for an easy way to make Glass and Wood Breakable (When Shot).
I just want them to disapear when they have been Shot.
Does anybody know any easy way of Doing this?
Thanks
Im looking for an easy way to make Glass and Wood Breakable (When Shot).
I just want them to disapear when they have been Shot.
Does anybody know any easy way of Doing this?
Thanks
-
- Core Staff
- Posts: 2214
- Joined: February 6th, 2006, 3:18 pm
- Location: Germany/Bayern
Re: Easy Breakable Glass / Wood
Make your window a script_brushmodel and the destroyed glass, well if there should be something left after shooting too and make it a script_brushmodel tool. Now make at the window a trigger_damage.
and script like that
and script like that
Code: Select all
main(){
maps\mp\_load::main();
level.addDamage=0;
}
window(){
trig = getent ("window_trigger", "targetname");
model = getent ("window_brushmodel", "targetname");
destroymodel = getent("window_destroymodel", "targetname");
destroymodel hide();
while(1){
trig waittill ("damage", idamage);
level.addDamage += idamage;
if(level.addDamagevent > 300){
model hide();
model notsolid();
destroymodel show();
break;
}
}
}
THAT HANDS WERE NOT TRACED!
visit my blog: Link
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality
Re: Easy Breakable Glass / Wood
Hello
Is there not a way of not using a Trigger?
I have about 500 Glass Peices =]
Im sure there must be a way
Thanks
Is there not a way of not using a Trigger?
I have about 500 Glass Peices =]
Im sure there must be a way
Thanks
Re: Easy Breakable Glass / Wood
Dunno
I remember someone telling me how to do it Before.
It was you Sam or KILL3R.
I gave it Targetnames and i think i might of made it a script_brushmodel.
Then i just added something into my GSC File.
I remember someone telling me how to do it Before.
It was you Sam or KILL3R.
I gave it Targetnames and i think i might of made it a script_brushmodel.
Then i just added something into my GSC File.
Re: Easy Breakable Glass / Wood
Dont Know
Would i have to keep making differnt targetnames for the following code?
Would i have to keep making differnt targetnames for the following code?
Code: Select all
main(){
maps\mp\_load::main();
level.addDamage=0;
}
window(){
trig = getent ("window_trigger", "targetname");
model = getent ("window_brushmodel", "targetname");
destroymodel = getent("window_destroymodel", "targetname");
destroymodel hide();
while(1){
trig waittill ("damage", idamage);
level.addDamage += idamage;
if(level.addDamagevent > 300){
model hide();
model notsolid();
destroymodel show();
break;
}
}
}
Re: Easy Breakable Glass / Wood
Code: Select all
main(){
maps\mp\_load::main();
window = getEntArray("window","targetname");
windowTrig = getEntArray("windowTrigger","targetname");
windowDamaged = getEntArray("windowDestroyModel","targetname");
for(i=0;i<window.size;i++)
windowTrig[i] thread checkWindow(window[i],windowDamaged[i]);
}
checkWindow(window,windowDamaged){
windowDamaged hide();
self waittill("trigger");
window delete();
windowDamaged show();
}
window: Window script_brushmodel
windowTrigger: Can be any trigger.
windowDestroyModel: script_brushmodel/script_model to show after destroyed
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet
-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Easy Breakable Glass / Wood
Simplify the script further using "target"
i.e
fixeddoor = entity
doortrigger = entity.target
brokendoor = entity.target
brokendoor = brokendoor.target
Now you need only one array.
Maybe tomorrow I will create a quick prefab, if you do not understand it.
there is also possibly a command to do all this without triggers. I used it on one of my major projects... that flatlined
i.e
fixeddoor = entity
doortrigger = entity.target
brokendoor = entity.target
brokendoor = brokendoor.target
Now you need only one array.
Maybe tomorrow I will create a quick prefab, if you do not understand it.
there is also possibly a command to do all this without triggers. I used it on one of my major projects... that flatlined
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
-
- Core Staff
- Posts: 2214
- Joined: February 6th, 2006, 3:18 pm
- Location: Germany/Bayern
Re: Easy Breakable Glass / Wood
Ok I remembered that I've read this tutorial what is exactly what you WANT!
http://www.modsonline.com/Tutorials-read-117.html
http://www.modsonline.com/Tutorials-read-117.html
THAT HANDS WERE NOT TRACED!
visit my blog: Link
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Easy Breakable Glass / Wood
<Mapping section - No Spam!>
And that was what I remember using, saves me some hassle.
(although exactly what he wanted was no trigger)
And that was what I remember using, saves me some hassle.
(although exactly what he wanted was no trigger)
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Who is online
Users browsing this forum: No registered users and 2 guests