local.player=parm.other

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
oddball
Corporal
Posts: 44
Joined: Tue May 27, 2003 3:49 pm
Contact:

local.player=parm.other

Post by oddball »

maybe a stupid question, but sometimes i see local.player=parm.other in scripts.

where doest parm.other stand for ?
[VS-UK]Maj.OddBall[BnHQ]
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

It is the last guy that triggered a trigger. Kinda ugly way of scripting, though I wouldn't know a better one :(
Image
User avatar
oddball
Corporal
Posts: 44
Joined: Tue May 27, 2003 3:49 pm
Contact:

Post by oddball »

maybe store the playernumber in a variable as soon as there's a trigger event ?
[VS-UK]Maj.OddBall[BnHQ]
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Yes that's basically what local.player = parm.other does... you'll usually find it below a waittill trigger line or as the first line of a setthread thread.
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

local.player

Post by tltrude »

Actually, it stores all the trigger user's properties (parameters), including his targetname, as a variable. So, anything you do to "local.player" will affect that player. However, the properties of that player are not updated in the variable, unless "local.player = parm.other" is in a continuously looping thread.

You are not restricted to using "local.player" as the variable name--"local.sucker", or any name, will work just as well.
Tom Trude,

Image
User avatar
oddball
Corporal
Posts: 44
Joined: Tue May 27, 2003 3:49 pm
Contact:

Post by oddball »

ok, pretty clear now,
Thanks.
:D
[VS-UK]Maj.OddBall[BnHQ]
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

although...

you don't need to seu local.player ou can use parm.other for all te commands

so
local.player = parm.other
local.player kill

could be
parm.other kill
hope this helps, prob not cos it's all foreign 2 me :-/
Post Reply