Jump to content
Sign in to follow this  
iceman77

Proximity hint / message in MP

Recommended Posts

I would like only those close enough to a certain object (in this case a hostage) to be able to see a message. I know I can use MP framework to achieve such a thing, but what condition would I use? Something like (hostage distance player < 50), but would that work for MP game to achieve the desired effect?

OnAct:

{[nil,_x,"loc",rHINT,"Some hint"] call RE} forEach playableUnits

Share this post


Link to post
Share on other sites

Try this.

[nil, nil, rSPAWN, [], {if (player distance OBJECT < 50) then {hint "hello"};}] call RE;  

Share this post


Link to post
Share on other sites

If the onAct part means it's in a trigger you can just use thisList

{[nil,_x,"loc",rHINT,"Some hint"] call RE;} forEach thisList;

Share this post


Link to post
Share on other sites

Thanks. I'll have a look at those.

---------- Post added at 13:13 ---------- Previous post was at 11:53 ----------

Okay so I tried to use rGlobalChat to have the same effect as hint. trigger; 100x100, conditions:Blufor present, somevar && someOthervar.

onact

{[nil,_x,rGlobalChat,"This is a global message for only those in the trigger list at time of activation"] call RE} forEach thisList

It doesn't work at all, hosted or dedicated. The trigger does fire though, but no global chat is displayed.

---------- Post added at 13:21 ---------- Previous post was at 13:13 ----------

swapping _x and nil seemed to do the trick

---------- Post added at 13:38 ---------- Previous post was at 13:21 ----------

okay, so now, on a dedicated it shows the global chat message 2x. :(

I tried using

{[nil,_x,[b]"loc"[/b],rGlobalChat,"This is a global message for only those in the trigger list at time of activation"] call RE} forEach thisList

but then no text is displayed.

---------- Post added at 14:39 ---------- Previous post was at 13:38 ----------

sorted, I ran an isserver check

Edited by Iceman77

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  

×