Results 1 to 10 of 10

Thread: Global hint when a player enters a trigger

  1. #1

    Global hint when a player enters a trigger

    This should be fairly simple...but Ive tried about everything i could find with no luck. I've also searched just about everything and although ive found some basic ideas I've had no luck with them.

    All i want to do is announce globally via hint or some other method when a player enters a trigger area. If possible it should be the players name (not the units name) so for exmple: "Playername has reached waypoint One".

    Thanks in advance.

  2. #2
    Multiplayer or Singleplayer?

    Both work with the "list" function though. Just locality is the "issue" here.

  3. #3
    Private First Class
    Join Date
    Oct 15 2009
    Posts
    28
    Author of the Thread
    Multiplayer - thanks.

  4. #4
    I'm also having this issue...I'm trying to add an action to start a conversation (since i cant figure out the conversation scripting) so I want the hint to appear to all players in MP when someone clicks the converstaion action.

    I'm using this addAction ["My Question", "Myanswer.sqf"]; hint works perfectly just cant get it to all players....


    also in the beginning I have a hint within an Units init

    hint "Blahblahblah"; the hint also works perfect just not to all players

  5. #5
    Quote Originally Posted by Blackfox34 View Post
    I'm also having this issue...I'm trying to add an action to start a conversation (since i cant figure out the conversation scripting) so I want the hint to appear to all players in MP when someone clicks the converstaion action.

    I'm using this addAction ["My Question", "Myanswer.sqf"]; hint works perfectly just cant get it to all players....


    also in the beginning I have a hint within an Units init

    hint "Blahblahblah"; the hint also works perfect just not to all players
    http://community.bistudio.com/wiki/L...in_Multiplayer

    ---------- Post added at 06:50 PM ---------- Previous post was at 06:48 PM ----------

    Quote Originally Posted by Lexxer View Post
    Multiplayer - thanks.
    Right locality says that each player is local to his own pc. Thus you had to execute it on the client himself and not on the server.

    Also it's not hard but a little tricky to keep track on who already had the message and who hadn't.

    The thing that I would do is to do it like this on the client

    waitUntil{player in list triggerName};
    hint "You have reached waypoint x";

    that will work.

  6. #6
    Private First Class
    Join Date
    Oct 15 2009
    Posts
    28
    Author of the Thread
    That will work but not exactly what Im trying to do. I want a global message with the name of the player that has reached the specified waypoint (marker). It also needs to fire off for anyone that enters the trigger area.

    So:

    player x has reached the first location
    player y has reached the first location

    etc etc.

  7. #7
    Oh my fault sorry

    waitUntil{player in list triggerName};
    hint format ["%1 has reached waypoint x",name player];


    And yes it will show the name of every single one as player is local to the machine of the player.
    Last edited by Joshii; Jul 9 2010 at 19:10.

  8. #8
    That will only hint about your own unit, not all units. Hint is a local command.

  9. #9
    This is what I use

    Code:
    tText = "Yellow wpt5"; {tText = tText + "\n" + (name _x);} forEach thisList; hint tText;
    Set trigger to bluefor present

    on Act: put the above code. You can change Yellow wpt5 to whatever you want. That will be the hint. In this case it says the yellow wpt5 then the name of player, that is in the trigger. If you want to reverse that and say "player name" "Yellow wpt5" you would change it to this


    Code:
    tText = "Yellow wpt5"; {"\n" + (name _x) + tText = tText + "\n";} forEach thisList; hint tText;
    I think thats right anyway. I know the first one works. We use it in our training map.

  10. #10
    Private First Class
    Join Date
    Oct 15 2009
    Posts
    28
    Author of the Thread
    That was exactly what I needed. Thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •