Jump to content
Sign in to follow this  
Doodle

Name player who used radio trigger

Recommended Posts

On a dedi server I have a simple radio trigger that displays a hint -

RADIO ALPHA

COND This

ACT hint "Someone has called for support";

I would like the message to say the name of the player who has called for support ie "John has called for support". or Peter 2 etc depending on who uses the radio

thanks in advance

---------- Post added at 12:34 PM ---------- Previous post was at 12:20 PM ----------

Think I have solved this. - Sure I will be back if I havent..

Share this post


Link to post
Share on other sites

Just to note, it helps others who have the same question if you post up your solution rather than announcing that you simply figured it out.

Share this post


Link to post
Share on other sites

Hadnt get backa cos I found another problem so then wasnt sure if my solution worked.

But for reference "This && player == soldier1" in the COND of a trigger means only player named soldier1 will be able to use the radio trigger - even though the others can see it in their radio lists

working perfect on dedi

Share this post


Link to post
Share on other sites

init.sqf:

clientCode = nil;
"clientCode" addPublicVariableEventHandler {call (_this select 1)};

trigger activation:

clientCode = compile format ["hint '%1 has called for support'",player];
publicVariable "clientCode";

This was just off the top of my head (and will only work in multiplayer), so I can't confirm that 100%. This may help you if that doesn't work.

http://forums.bistudio.com/showthread.php?172867-Simplest-to-broadcast-a-message-globally

Edited by Waffle_SS

Share this post


Link to post
Share on other sites
init.sqf:

clientCode = nil;
"clientCode" addPublicVariableEventHandler {call (_this select 1)};

trigger activation:

clientCode = compile format ["hint '%1 has called for support'",player];
publicVariable "clientCode";

Thanks for this - Will give it a try - What I am trying to acheive is each of the 10 players in the mission have a "unique" ability

Would the above example broadcast the message to all players on a dedi and dont suppose you know if it is JIP and respawn friendly?

thanks in advance

Share this post


Link to post
Share on other sites

I have taken a look at this and I'm affraid I just cant get my head round it -

I am slowly getting a solution to my problems - its all part of this thread (maybe should merge them) HERE

I think that between all of you guys have have got it working as intended almost - just need a couple of buddies to test it with on dedi

Thanks

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×