Assigning a targetname to a player via AddOutput?

VenomAK

L1: Registered
Aug 2, 2009
4
0
I'm working on a map and what's troubling me is that I'm trying to make it so if a player touches a trigger, the trigger then does AddOutput on the !activator using the parameter "targetname chosenred" (which has worked in the past). I stopped mapping for a while and came back to it, and tried this method and for some reason I keep getting this error...

AddOutput input fired with bad string. Format: <output name> <targetname>,<inputname>,<parameter>,<delay>,<max times to fire (-1 == infinite)>

I've tried it like this:
OnStartTouch !activator,AddOutput,targetname chosenred,0,1

Is that correct or am I doing something wrong? I'd really appreciate some help.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,670
Output|Target|Input|Parameter
OnTrigger|!activator|AddOutput|targetname chosenred

That's how it should be put into the entity properties, I'm not sure if you said you tried that first, and the second thing was another try? But anyway that should work.
 

VenomAK

L1: Registered
Aug 2, 2009
4
0
Yes I tried that but not with OnTrigger it seems that with any other output it doesn't work. Just tried it with OnTrigger and it works perfectly. Thank you for the help.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,670
I didn't even notice that, actually. I just copied the table from another post where I had used OnTrigger. It should work with any output, as I have used it in the past. But if OnTrigger suits your needs then great.