Invisible trigger_use?

Have questions about CoD/UO mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Pedsdude
Site Admin
Site Admin
Posts: 15914
Joined: October 15th, 2004, 7:18 pm
Location: UK

Invisible trigger_use?

Post by Pedsdude » February 14th, 2006, 9:18 pm

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

Luke
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 1774
Joined: May 31st, 2005, 12:42 am
Location: Cornwall, UK

Post by Luke » February 14th, 2006, 9:25 pm

Without scripting, give the trigger these values:

key: cursorhint
value: HINT_NOACTIVATE

Pedsdude
Site Admin
Site Admin
Posts: 15914
Joined: October 15th, 2004, 7:18 pm
Location: UK

Post by Pedsdude » February 14th, 2006, 9:49 pm

Roger that, thanks.

Also, is it possible to make a trigger a script_brushmodel? Say for example I want a moving hurt trigger...
Image
Image

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13315
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » February 14th, 2006, 10:07 pm

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...
impossible to move triggers.

But it is possible to turn them on and off.
Image
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

Pedsdude
Site Admin
Site Admin
Posts: 15914
Joined: October 15th, 2004, 7:18 pm
Location: UK

Post by Pedsdude » February 14th, 2006, 10:33 pm

And how would I do that? :)

Also, noob question, but how do I change the trigger_hurt so that it hurts less/more?
Image
Image

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13315
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » February 14th, 2006, 11:42 pm

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 ;)
Image
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

Pedsdude
Site Admin
Site Admin
Posts: 15914
Joined: October 15th, 2004, 7:18 pm
Location: UK

Post by Pedsdude » February 14th, 2006, 11:50 pm

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
Image
Image

Luke
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 1774
Joined: May 31st, 2005, 12:42 am
Location: Cornwall, UK

Post by Luke » February 15th, 2006, 12:53 am

Drofder2004 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 ;)
Its your secret, why u asking peds if he dont want to let everyone in on it :P

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13315
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » February 15th, 2006, 1:32 am

Luke wrote:
Drofder2004 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 ;)
Its your secret, why u asking peds if he dont want to let everyone in on it :P
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 switch :P)

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;
		}
	}
}
Try that out.
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.
Image
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

Pedsdude
Site Admin
Site Admin
Posts: 15914
Joined: October 15th, 2004, 7:18 pm
Location: UK

Post by Pedsdude » February 15th, 2006, 5:57 pm

Thank you.

Is it meant to be 'tigger' as supposed to 'trigger' in the script?
maps\mp\_utility::tiggerOff();
Last edited by Pedsdude on February 15th, 2006, 7:08 pm, edited 1 time in total.
Image
Image

Pedsdude
Site Admin
Site Admin
Posts: 15914
Joined: October 15th, 2004, 7:18 pm
Location: UK

Post by Pedsdude » February 15th, 2006, 7:08 pm

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;
      }
   }
}
Script compile error, bad syntax :?

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

Luke
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 1774
Joined: May 31st, 2005, 12:42 am
Location: Cornwall, UK

Post by Luke » February 15th, 2006, 7:16 pm

It will make it easier to find if you run it in developer mode

Code: Select all

/developer 1
before you load the map then when you get the error it will tell you which line number of the script the errors on.

Pedsdude
Site Admin
Site Admin
Posts: 15914
Joined: October 15th, 2004, 7:18 pm
Location: UK

Post by Pedsdude » February 15th, 2006, 7:24 pm

Image
(the .gsc file for the code drofder gave me I named 'zhurt.gsc')
Image
Image

Pedsdude
Site Admin
Site Admin
Posts: 15914
Joined: October 15th, 2004, 7:18 pm
Location: UK

Post by Pedsdude » February 15th, 2006, 8:39 pm

grrr i HATE mapping.

Now my bloody map won't load in cod - it just causes the game to have a serious error and close :evil:
Image
Image

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13315
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » February 15th, 2006, 11:38 pm

Sorry my bad.
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;
      }
   }
}
Image
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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest