Bohemia Interactive Forums  

Go Back   Bohemia Interactive Forums > BI MILITARY GAMES FORUMS > ARMA 2 EDITING > ArmA 2 & OA - MISSION EDITING & SCRIPTING

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.

Reply
 
Thread Tools Display Modes
Old 03-18-2010, 03:30 PM   #1
IceBreakr
Chief Warrant Officer
 
IceBreakr's Avatar
 
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!
IceBreakr is offline   Reply With Quote
Old 03-18-2010, 06:10 PM   #2
Loyalguard
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
Loyalguard is offline   Reply With Quote
Reply
Go Back   Bohemia Interactive Forums > BI MILITARY GAMES FORUMS > ARMA 2 EDITING > ArmA 2 & OA - MISSION EDITING & SCRIPTING  Reload this Page  How to report the guy who fired the first shot?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:44 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.