Disable trigger for...

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Barttje
Sergeant Major
Posts: 111
Joined: Sat Aug 20, 2005 8:52 pm

Disable trigger for...

Post by Barttje »

Hi all

How can I remove a trigger for only one player :?:
so the rest can use the triger (once)

tnx
Old nickname: Bartjerambo
New nickname: Barttje
LeBabouin
Lance Corporal
Posts: 22
Joined: Tue Jun 21, 2005 11:10 pm

Post by LeBabouin »

Which player? anyone? You? What distinguishes that player from the others? And what game for?
Barttje
Sergeant Major
Posts: 111
Joined: Sat Aug 20, 2005 8:52 pm

Post by Barttje »

anyone can use it once, is it possible?

(oh BTW, i'm scripting in notepad so not in mohradaint or whaterver)
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

The usually way of doing it is to give a player a value after they have triggered the trigger once then in the thread for the trigger you check if that player has had the value set

mythread:
while(1)
{
$mytrigger waittill trigger

local.player = parm.other

if(local.player.somevalue == 1) // check if value is set yet
end // if value is set thread will end

local.player.somevalue = 1 // if thread didn't end set the vaue for next time

.....
.....
}
end
Image
Barttje
Sergeant Major
Posts: 111
Joined: Sat Aug 20, 2005 8:52 pm

Post by Barttje »

(The 2 post up here are wrong posted,,, srry :? ) - Fixed bdbodger

Tnx bdbodger it works :D
but if i walk again in to the trigger he is saying the trigger message:

Code: Select all

local.trigger message ".... Blabla ...."
can i disable it to?
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

No don't think you can but you and add a iprintln statement to your thread instead of the message key on the trigger or local.player println I think will print a line only to that one player .
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

message

Post by tltrude »

Doesn't "println" only print to the console and not the screen?
Tom Trude,

Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

According to a couple of our fine members here at .map it is actually iprint

/forum/viewtopic.php?t=9450&highlight=local+player+print

I knew it was one of the print statements . Backed up by the SDK Docs

iprint( String string, [ Integer bold ] )

prints a string to the player, optionally in bold
Image
Barttje
Sergeant Major
Posts: 111
Joined: Sat Aug 20, 2005 8:52 pm

Post by Barttje »

okeey ill do that, Tnx all :)
Post Reply