Page 1 of 1

Have a trigger question...

Posted: Fri Aug 06, 2004 4:33 pm
by G3mInI
I have this statement for a teleport trigger that I want a player to activate by using the use key.

Code: Select all

while(1)
			{
			local.player = parm.other
			local.teletrigg waittill trigger
			
			if(local.player.useheld == 1)
				{
				local.start_snd playsound beam_off
				local.player tele ( local.teleporter.end )
				local.dest_snd playsound snd_b_zing8
				local.teletrigg nottriggerable
				local.beam scale 1
				local.hum stoploopsound
				wait 25
				local.teletrigg triggerable
				local.hum loopsound beam_on
				local.beam scale 25
				}
			waitframe
			}

Everytime I test this out, the very first time I trip the the trigger or try to, I get this error in console:


Code: Select all

*Area51*G3mInI_2LT has joined the Allies
			if(local.player.useheld == 1) (global/g3mini_teleporter.scr, 59)
			if(local.player^

^~^~^ Script Error: Field 'useheld' applied to NULL listener

			if(local.player.useheld == 1) (global/g3mini_teleporter.scr, 59)
			if(local.player^

^~^~^ Script Error: Field 'useheld' applied to NULL listener

The trigger does work everytime and the player does teleport. The next time I go to the trigger, there is never anymore errors. This error only appears the very first time I try to use the trigger after the map is loaded. Any ideas why ?

G3mInI

local.player = parm.other

Posted: Fri Aug 06, 2004 4:57 pm
by tltrude
"local.player = parm.other" should be after the trigger event.

Posted: Fri Aug 06, 2004 6:03 pm
by lizardkid
isn't parm.other the last person to have tripped the trigger? if not, what is?

Re: local.player = parm.other

Posted: Fri Aug 06, 2004 8:14 pm
by G3mInI
tltrude wrote:"local.player = parm.other" should be after the trigger event.

That did it. Thank you sir. Am now error free in the console. It's a pretty rare event for me, so I am going to celebrate! :shock:

Cheers,

G3mInI

parm

Posted: Sat Aug 07, 2004 4:04 am
by tltrude
Yes it is lizardkid, but he had it before the trigger was fired. So, "loacl.player" was NIL (no value).