its very simple so....
lets start
1. make 2 walls
2. make doors betwen 2 walls and then make orgin textures>tools>orgi (must be right or left!!!!!!! 1 square!)
3. select orgi and door and click on 2d view and make orgi and doors to script>brushmodel
4. press N and type
key: targetname
value: dmgdoor
(press enter)
5. ok now make trigger damage - click on 2d view>trigger>damage
make size what you want...
6. have trigger damage selected and press N and type
key: targetname
value: trig_dmgdoor
(press enter)
and then type this
key: spawnflags
value: 31
(press enter)
ok now the scripting time!
open notepad and copy that in it
Code: Select all
main()
{
thread door1_rotate();
}
door1_rotate()
{
door1 = getent("dmgdoor", "targetname");
trig = getent("trig_dmgdoor", "targetname");
while (1)
{
trig waittill("trigger");
door1 playsound("dooropen");
door1 rotateyaw(90, 1.5, 0.7, 0.7);
door1 waittill("rotatedone");
wait (3);
door1 playsound("doorclose");
door1 rotateyaw(-90, 1.5, 0.7, 0.7);
door1 waittill("rotatedone");
}
}
and then open your mp_ / jm_(yourmapname).gsc
and add this line
Code: Select all
maps\mp\dmgdoor::main();
Code: Select all
main()
{
//maps\mp\x_fx::main();
maps\mp\_load::main();
maps\mp\mp_door::main();
maps\mp\mp_door1::main();
maps\mp\mp_door4::main();
maps\mp\mp_door5::main();
maps\mp\dmgdoor::main();
maps\mp\dmgdoor1::main();
setExpFog(0.0001, 0.55, 0.6, 0.55, 0);
// setCullFog(0, 16500, 0.55, 0.6, 0.55, 0);
ambientPlay("ambient_france");
game["allies"] = "american";
game["axis"] = "german";
game["attackers"] = "allies";
game["defenders"] = "axis";
game["american_soldiertype"] = "normandy";
game["german_soldiertype"] = "normandy";
setCvar("r_glowbloomintensity0", ".25");
setCvar("r_glowbloomintensity1", ".25");
setcvar("r_glowskybleedintensity0",".3");
}
tnx to Levcek