Forum Jump :

Author Message

Posts: 1189

Level: Member

Country: tr
Occupation: Computer Science student
Age: 22
In-game name: Wak

#183698 Posted at 2015-11-02 21:41        
Should clarify, by "you can use it anywhere" I meant "You can use it anywhere in this script". When there is a underscore in front of a variable name it means it's local to it's scope (Pierre explained it, I'm not going to go too much in). You can remove the underscore and change the second statement in to a global variable:
groupLead = leader _unit;

That way you whould be able to use groupLead in a trigger, or anywhere else.
groupLead groupChat "Let's roll out!";

Be careful though, if the trigger is triggered before init.sqf (if players start inside the trigger etc.) it might not work, and will probably print an error in the logs.

Sometimes I like to think as I started the whole "earplugs" thing.

W0lle: The only advice I can give you is: Do not try to understand BI. You will not succeed and it only makes your brain go boom. I would even go so far and say that not even they understand their own actions :-D.

#define getDamage getDammage

Tags: Group, Scripting, Talk