Turning off and on triggers
Moderator: Core Staff
Turning off and on triggers
I want my hurt trigger to turn on then wait a couple seconds then turn off and waits then turns back on without anyone triggering it to do that. So it does it constantly. How would I write that?
Re: Turning off and on triggers
Nvm...I got it to work thanks to fuzzmunch.
main()
{
mp_test_lasers();
}
mp_test_lasers()
{
switch_laser = getent("mp_test_laser_1","targetname");
wait 0.05;
switch_status1 = 0;
wait 0.05;
maps\mp\_utility::triggerOff();
wait 0.05;
while(1)
{
switch_laser maps\mp\_utility::triggerOn();
wait 5;
switch_laser maps\mp\_utility::triggerOff();
wait 5;
}
}
main()
{
mp_test_lasers();
}
mp_test_lasers()
{
switch_laser = getent("mp_test_laser_1","targetname");
wait 0.05;
switch_status1 = 0;
wait 0.05;
maps\mp\_utility::triggerOff();
wait 0.05;
while(1)
{
switch_laser maps\mp\_utility::triggerOn();
wait 5;
switch_laser maps\mp\_utility::triggerOff();
wait 5;
}
}
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Turning off and on triggers
Code: Select all
switch_laser = getent("mp_test_laser_1","targetname");
wait 0.05;
switch_status1 = 0;
wait 0.05;
maps\mp\_utility::triggerOff();
wait 0.05;
Code: Select all
switch_laser = getent("mp_test_laser_1","targetname");
switch_status1 = 0;
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 27 guests