Forum Jump :

Author Message

Kosm0  



Posts: 1
Rank:


Level: Member

Country: au
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2015-10-09 01:40        
     
Hey, new to these forums and need some scripting help!

So basically, I want my client to execute a simple script (Something like a systemChat or Hint) when a player comes within a 25m radius of me, and I'm not sure how I would do this in script. I've done some research but most of the functions I find aren't even in A2.


Author Message


Posts: 1589
Rank:


Level: Member

Country: pf
Location: Tahiti
Occupation: too many Arma
Age: 59
In-game name: Kobayashi Maru

 
#2 Posted at 2015-10-09 03:59        
     
Your research is short! You can attach a trigger to your unit (or logic) even via editor (my_trigger attachTo [my_unit, [0,0,0]]; works in Arma2 i guess. Then in trigger act: 0 = [] spawn { all you want here}

PLEASE CONTACT ME ON BI FORUMS FOR ANY SCRIPT / MOD QUESTION. TKS

Advertisement


Author Message


Posts: 51
Rank:


Level: Member

Country: ca
Location: Victoria, British Columbia
Occupation: Canadian Forces Weapon Technician
Age:
In-game name: PiZZADOX

 
#3 Posted at 2015-11-06 00:54        
     
Just note that if you only want the effects to affect players OTHER than the player with the trigger, you need an exception on thislist for the player, so you are only counting the players in either addition to yourself or excluding yourself. A hack way to do this is simply by checking if there are two people or more in the trigger area and then making a script exitwith {} if it is the player with the trigger. (either a name or setvariable would do)

Similar hack method used with NearObjects for checking for additional "Man" objects in the position of a "Man" object.

https://community.bistudio.com/wiki/2D_Editor:_Triggers#Condition