Hi,
Do you know any map with moving lasers which are killing people? Or maybe u now script than it would be nice if you will share of it, coz i need it to my map
Hi,
Do you know any map with moving lasers which are killing people? Or maybe u now script than it would be nice if you will share of it, coz i need it to my map
Last edited by BaX; 4th March 2013 at 10:00.
Just make an laser texture and put an trigger to it > done
Moving lasers = just move the lasers itself, for the trigger i think its trigger linkTo(laser.origin);
No ... No ... this is not possible .......
kung foo man (4th March 2013)
Do this:
Make triggers -> hurt over all the lasers you have. Once made them , select all and give them these values (important: select all of them in one time, not one by one):
key: targetname
value: trig_dmg
key: dmg
value: <damage> (ammount of damage. values over 100 = instant death)
Now select the lasers you made, script -> brushmodel and give them these values
key: targetname
value: lasers
In the script:
PHP Code:
main()
{
thread lasers();
}
lasers()
{
lasers = getent("lasers","targetname");
trig_damage = getent("trig_dmg","targetname");
trig_damage enablelinkto();
trig_damage linkto(lasers); // linking the damage trigger to the lasers
while(1)
{
lasers moveto((x,y,z),time,accel time,decel time);
lasers waittill("movedone");
lasers moveto((x,y,z),time,accel time,decel time);
lasers waittill("movedone");
}
}
Last edited by pollo; 4th March 2013 at 18:33.
BaX (6th March 2013),kung foo man (5th March 2013)
You can use trigger_multiple too. You will need to script the damage, but you can disable the damage when you want and hide the brushmodel.
Also you need to add this to the script before the loop starts:
Edit: Just to be clear, you need to use enableLinkTo() before you can link triggers.PHP Code:
lasers notsolid();
Last edited by Mitch; 4th March 2013 at 18:42.
kung foo man (5th March 2013)
enableLinkTo() is not needed in COD2, only in COD4
Ni3ls (5th March 2013)
Hey, combined lasers here
PHP Code:
thread lasers();
PHP Code:
lasers()
{
laser_1 = getent("laser_1","targetname");
laser_hurt_1 = getent("laser_hurt_1","targetname");
laser_2 = getent("laser_2","targetname");
laser_hurt_2 = getent("laser_hurt_2","targetname");
laser_3 = getent("laser_3","targetname");
laser_hurt_3 = getent("laser_hurt_3","targetname");
laser_4 = getent("laser_4","targetname");
laser_hurt_4 = getent("laser_hurt_4","targetname");
laser_5 = getent("laser_5","targetname");
laser_hurt_5 = getent("laser_hurt_5","targetname");
laser_6 = getent("laser_6","targetname");
laser_hurt_6 = getent("laser_hurt_6","targetname");
laser_7 = getent("laser_7","targetname");
laser_hurt_7 = getent("laser_hurt_7","targetname");
laser_hurt_1 linkto(laser_1);
laser_hurt_2 linkto(laser_2);
laser_hurt_3 linkto(laser_3);
laser_hurt_4 linkto(laser_4);
laser_hurt_5 linkto(laser_5);
laser_hurt_6 linkto(laser_6);
laser_hurt_7 linkto(laser_7);
while(1)
{
laser_1 movey(200,0.7);
laser_2 movey(100,0.7);
laser_3 movey(-100,0.7);
laser_4 movex(-150,0.7);
laser_5 movex(150,0.7);
laser_6 rotateyaw(90,0.7);
laser_7 rotateyaw(-90,0.7);
wait 1;
laser_1 movey(-200,0.7);
laser_2 movey(-100,0.7);
laser_3 movey(100,0.7);
laser_4 movex(150,0.7);
laser_5 movex(-150,0.7);
laser_6 rotateyaw(-90,0.7);
laser_7 rotateyaw(90,0.7);
wait 1;
}
}
BaX (6th March 2013),kung foo man (6th March 2013)
If there is anything solid about the lasers, your movex and movey will probably fuck up their movements.
To ensure proper movements, always use moveto()
Whats wrong with movex()?
timescale 0.01
Last edited by BaX; 6th March 2013 at 11:29.