Home   Help Search Login Register  

Author Topic: Locally created Radio Triggers question.  (Read 1442 times)

0 Members and 1 Guest are viewing this topic.

Offline laggy

  • Members
  • *
  • "Behold a pale horse"
Locally created Radio Triggers question.
« on: 20 Mar 2009, 15:46:58 »
If I create a local radio trigger i.e:

if (local player) then
{
trigger1 = createTrigger ["EmptyDetector", position player];
trigger1 setTriggerActivation ["ALPHA", "", true];
trigger1 setTriggerArea [0, 0, 0, false];
trigger1 setTriggerStatements ["this", "BlaBlaBla", ""];
trigger1 setTriggerText "BlaBlaBla";
}

Will this trigger create only local effects, just seen by using player if I use it for hints or sidechat?

What I'm planning to do is to have that trigger start a chat or hint, that shows how many units are left in friendly groups and also reveal those friendlies.

I only want that information to be shown to the player that calls for it obviously.

Cheers.
And I looked and beheld a pale horse and his name that sat on him was Death and Hell followed with him.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Locally created Radio Triggers question.
« Reply #1 on: 21 Mar 2009, 14:17:38 »
A script-created trigger is indeed entirely local, unlike a mission-editor placed trigger.

However, your code will only run for SP or the host in MP, since it doesn't take into account the fact that a JIP player doesn't have a player object at the start of the game:
Code: (only run on a client machine) [Select]
if (not (isServer and (isNull player))) then
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline laggy

  • Members
  • *
  • "Behold a pale horse"
Re: Locally created Radio Triggers question.
« Reply #2 on: 21 Mar 2009, 18:25:53 »
Thx again.
And I looked and beheld a pale horse and his name that sat on him was Death and Hell followed with him.