scripting - one player message

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
At0miC
General
Posts: 1164
Joined: Fri Feb 27, 2004 11:29 pm
Location: The Netherlands

scripting - one player message

Post by At0miC »

How to send a message to 'one' player (when he hit a trigger)?

I know how to send a message to all players duh, but dunno how to send a message to one. :?
Elgan
Lieutenant General
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

parm.other iprint "this message is yellow "

parm.other iprint "this message is white with a click" 1

or give the trigger a message key valure thing and it will showa white message in the center.
User avatar
At0miC
General
Posts: 1164
Joined: Fri Feb 27, 2004 11:29 pm
Location: The Netherlands

Post by At0miC »

thnx :wink:
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

does it have to have parm.other? can i just have

$this do that
iprint "it did the thing"
$this undo that
iprint "it undid the thing"

?
Image
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Post by strafer »

local.player = parm.other

local.player iprint "message"
Image
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

but what if my entire script uses the

Code: Select all

$targetname
and not the

Code: Select all

local.targetname = $targetname
style stuff and i dont want to use the local.player iprint? is it possible for this to work?
Image
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Post by strafer »

[HDL]-{Gen} Dragon wrote:but what if my entire script uses the

Code: Select all

$targetname
and not the

Code: Select all

local.targetname = $targetname
style stuff and i dont want to use the local.player iprint? is it possible for this to work?
I'm not fully understanding what you are asking.
Image
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

is there anyway to i can just make it

Code: Select all

iprint "yadda"
and nothing else??
Image
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Post by strafer »

[HDL]-{Gen} Dragon wrote:is there anyway to i can just make it

Code: Select all

iprint "yadda"
and nothing else??
So it would print to one player? Well, they would have to come across a trigger to do it. You can't just have stuff happen then put iprint "hello" and it print to a specific player. You scan all clients with a script with an array and a for loop and have it print to a specific player like this:

$player[local.array] iprint "hello"
Image
Elgan
Lieutenant General
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

[HDL]-{Gen} Dragon wrote:does it have to have parm.other? can i just have

$this do that
iprint "it did the thing"
$this undo that
iprint "it undid the thing"

?
well u cant print to objects?:S

parm.other i used cos its the player in a trigger.
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Post by strafer »

Yeah, I really can't see why you can't use parm.other
Image
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

ok ok, ill use parm.other........
Image
Post Reply