Invisible trigger_use?
Moderator: Core Staff
Invisible trigger_use?
Is there a way to have a trigger_use, but so that the use icon doesn't appear when you are near it?


-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
impossible to move triggers.Pedsdude wrote:Roger that, thanks.
Also, is it possible to make a trigger a script_brushmodel? Say for example I want a moving hurt trigger...
But it is possible to turn them on and off.

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: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
What exavtly do you want to do? Turning on/off triggers may not be the solution.
(You may be able to use my invisible nonsolid wall method) If you dont want to let everyone in on the secret, pm/email me
(You may be able to use my invisible nonsolid wall method) If you dont want to let everyone in on the secret, pm/email me


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
I would like to have a series of buttons. If you press one, it turns on a trigger_hurt in a particular area to hurt people. If you press another, it activates another trigger_hurt in another area. etc etc
Could it be similar to this? (thanks to KillerSam) http://www.modsonline.com/Tutorials-read-292.html
Could it be similar to this? (thanks to KillerSam) http://www.modsonline.com/Tutorials-read-292.html


-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Invisible Non-Solid walls is not a secret (infact I posted it on Mods online as a fix for the elevator bug [where you get stuck if you are under the moving object]) The secret Im on about is what Peds wants to do (e.g have a secret switchLuke wrote:Its your secret, why u asking peds if he dont want to let everyone in on itDrofder2004 wrote:What exavtly do you want to do? Turning on/off triggers may not be the solution.
(You may be able to use my invisible nonsolid wall method) If you dont want to let everyone in on the secret, pm/email me

Anyway, Peds.
cba to read that tutorial, the method is pretty simple.
Code: Select all
main()
{
thread switch1();
thread switch2();
}
switch1()
{
switch1 = getent("switch1","targetname");
trig_hurt1 = getent("trig_hurt1","targetname");
switch_status1 = 0;
trig_hurt1 thread maps\mp\_utility::tiggerOff();
while(1)
{
switch1 waittill ("trigger");
if(switch_status1 == 0)
{
trig_hurt1 thread maps\mp\_utility::triggerOn();
switch_status1 == 1;
wait 0.5;
}
else if(switch_status1 == 1)
{
trig_hurt1 thread maps\mp\_utility::triggerOff();
switch_status1 == 0;
wait 0.5;
}
}
}
switch2()
{
switch2 = getent("switch2","targetname");
trig_hurt2 = getent("trig_hurt2","targetname");
switch_status2 = 0;
trig_hurt2 thread maps\mp\_utility::tiggerOff();
while(1)
{
switch2 waittill ("trigger");
if(switch_status2 == 0)
{
trig_hurt2 thread maps\mp\_utility::triggerOn();
switch_status2 == 1;
wait 0.5;
}
else if(switch_status2 == 1)
{
trig_hurt2 thread maps\mp\_utility::triggerOff();
switch_status2 == 0;
wait 0.5;
}
}
}
Switch 1&2 are the switch to turn things on and off.
trig_hurt1&2 are the trigger_hurts.
If you want to add more switches just simply copy and paste and chang ethe numbers

Hopefully that works.

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
Code: Select all
main()
{
thread switch_spawn();
thread switch_underground();
}
switch_spawn()
{
switch_spawn = getent("switch_spawn","targetname");
trig_hurt_spawn = getent("trig_hurt_spawn","targetname");
switch_status1 = 0;
trig_hurt_spawn thread maps\mp\_utility::triggerOff();
while(1)
{
switch_spawn waittill ("trigger");
if(switch_status1 == 0)
{
trig_hurt_spawn thread maps\mp\_utility::triggerOn();
switch_status1 == 1;
wait 0.5;
}
else if(switch_status1 == 1)
{
trig_hurt_spawn thread maps\mp\_utility::triggerOff();
switch_status1 == 0;
wait 0.5;
}
}
}
switch_underground()
{
switch_underground = getent("switch_underground","targetname");
trig_hurt_underground = getent("trig_hurt_underground","targetname");
switch_status2 = 0;
trig_hurt_underground thread maps\mp\_utility::triggerOff();
while(1)
{
switch_underground waittill ("trigger");
if(switch_status2 == 0)
{
trig_hurt_underground thread maps\mp\_utility::triggerOn();
switch_status2 == 1;
wait 0.5;
}
else if(switch_status2 == 1)
{
trig_hurt_underground thread maps\mp\_utility::triggerOff();
switch_status2 == 0;
wait 0.5;
}
}
}

Arg, go on msn m8 so we can sort this out



It will make it easier to find if you run it in developer mode before you load the map then when you get the error it will tell you which line number of the script the errors on.
Code: Select all
/developer 1
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Sorry my bad.
Try this
Try this
Code: Select all
main()
{
thread switch_spawn();
thread switch_underground();
}
switch_spawn()
{
switch_spawn = getent("switch_spawn","targetname");
trig_hurt_spawn = getent("trig_hurt_spawn","targetname");
switch_status1 = 0;
trig_hurt_spawn thread maps\mp\_utility::triggerOff();
while(1)
{
switch_spawn waittill ("trigger");
if(switch_status1 == 0)
{
trig_hurt_spawn thread maps\mp\_utility::triggerOn();
switch_status1 = 1;
wait 0.5;
}
else if(switch_status1 == 1)
{
trig_hurt_spawn thread maps\mp\_utility::triggerOff();
switch_status1 = 0;
wait 0.5;
}
}
}
switch_underground()
{
switch_underground = getent("switch_underground","targetname");
trig_hurt_underground = getent("trig_hurt_underground","targetname");
switch_status2 = 0;
trig_hurt_underground thread maps\mp\_utility::triggerOff();
while(1)
{
switch_underground waittill ("trigger");
if(switch_status2 == 0)
{
trig_hurt_underground thread maps\mp\_utility::triggerOn();
switch_status2 = 1;
wait 0.5;
}
else if(switch_status2 == 1)
{
trig_hurt_underground thread maps\mp\_utility::triggerOff();
switch_status2 = 0;
wait 0.5;
}
}
}

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 1 guest