![]() |
|
|
|||||||
| ArmA 2 & OA - MISSION EDITING & SCRIPTING For discussing the technical aspects of creating custom ArmA 2 & the standalone expansion Operation Arrowhead missions as well as scripting. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Chief Warrant Officer
Join Date: Jun 2001
Location: Slovenia, EU
Posts: 3,503
|
How to report the guy who fired the first shot?
I'm working on a PvP mission with very strict ROE. Does anyone have a script that works in MP and reports (via hint or titletext) a name of the player who fires a first shot?
__________________
IceBreakr, C/O [SBP] - Slovenian Black Panthers (www.vojak.si) ![]() ^ click to visit www.icebreakr.com/islands ^ | Become a facebook fan of Isla Duala! |
|
|
|
|
|
#2 |
|
Staff Sergeant
Join Date: Jun 2007
Posts: 297
|
I don't know of an existing script per se, but it should be easy to create using a "fired" event hander. In order to get the hint to work MP, you would probably have to broadcast the unit parameter (the first element in the array that is passed when the EH fires) via publicVariable and maybe use addPublicVariableEventHandler to monitor for the first shot and report to all clients (except the person who fired first) which unit shot first. You would probaly want to use it to remove the fired event handler after the first shot on all units as well so that the script/code doesn't continue to fire every time someone shoots for the rest of the mission.
__________________
LoyalGuard OFPEC Editors Staff | Former ACE1 Dev Team Member ArmA1 Projects: Sahrani Electrical Grids Script Pack ArmA2 Projects: Chernarus Electrical Grid Script Pack & Addon |
|
|
|
![]() |
![]() |
![]() | How to report the guy who fired the first shot? |
| Thread Tools | |
| Display Modes | |
|
|