Home
Intel Depot
Editors Depot
Missions Depot
Addons Depot
Forum
Welcome, Guest
Monday 20th May 2013, 00:43:03
Home
Help
Search
Login
Register
OFPEC Forum
OFPEC Forum
»
Editors Depot - Mission Editing and Scripting
»
ArmA - Editing/Scripting General
(Moderators:
h-
,
savedbygrace
) »
Bullet Cam
Pages: [
1
]
Go Down
« previous
next »
Send this topic
Print
Author
Topic: Bullet Cam (Read 708 times)
0 Members and 1 Guest are viewing this topic.
greg147
Contributing Member
Offline
Bullet Cam
«
on:
16 May 2007, 15:28:48 »
Hi all,
I'm trying to get a bullet cam to work on a single shot from a sniper rifle. I've taken a look at Kronzky's Portable Target Range, which uses this feature, but I have no idea how it works. I'm unfamiliar with the .sqf format aswell.
So does anyone know how to get this working in ArmA?
Thanks
Logged
Royal Air Assault Battalion - [L/Cpl] Greg
RAAB
Mandoble
Editors Depot
Administrator
Offline
Re: Bullet Cam
«
Reply #1 on:
16 May 2007, 17:32:12 »
Same as in ofp: eventhandler fired getting the nearestobject of the type of ammo inside the event handler code and then removing the event handler so it works only for first bullet fired. Once you get the bullet object, just create a camera to follow it or use bullet switchCamera "EXTERNAL" and wait til isNull bullet.
For example:
bullethandler = player addEventHandler ["fired", {[_this] exec "getbullet.sqf"}]
Code:
//getbullet.sqf
_unit = _this select 0;
_type = _this select 4;
_unit removeEventHandler bullethandler;
_bullet = nearestObject [_unit, _type];
if (!isNull _bullet) then
{
_bullet switchCamera "EXTERNAL";
waitUntil{isNull _bullet};
player switchCamera "INTERNAL";
};
Logged
The Triple Blow
|
ArmA Videos
|
Mando Missile ArmA
greg147
Contributing Member
Offline
Re: Bullet Cam
«
Reply #2 on:
16 May 2007, 18:00:19 »
Thanks
For that example, where would I put
Code:
bullethandler = player addEventHandler ["fired", {[_this] exec "getbullet.sqf"}]
I'm getting an error when trying it:
'_bullet = |#|nearestObject |_unit, |type];'
Error Type Array, expected Number
Logged
Royal Air Assault Battalion - [L/Cpl] Greg
RAAB
JasonO
OFPEC Patron
Offline
Oh no...
Re: Bullet Cam
«
Reply #3 on:
16 May 2007, 18:53:41 »
I asked a similar question a while ago to target the bomb of an aircraft. It also works for anything that fires.
http://www.ofpec.com/forum/index.php?topic=29139.0
Hope this helps.
Logged
TNL - The New Life RPG
Mandoble
Editors Depot
Administrator
Offline
Re: Bullet Cam
«
Reply #4 on:
16 May 2007, 19:40:54 »
ups, change exec by execVM
Logged
The Triple Blow
|
ArmA Videos
|
Mando Missile ArmA
greg147
Contributing Member
Offline
Re: Bullet Cam
«
Reply #5 on:
16 May 2007, 23:45:43 »
Got it working, thanks for the help lads
Logged
Royal Air Assault Battalion - [L/Cpl] Greg
RAAB
Pages: [
1
]
Go Up
Send this topic
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
OFPEC The Editing Center
-----------------------------
=> General Announcements
=> Comments & Suggestions
=> Getting help with BI games
-----------------------------
Editors Depot - Mission Editing and Scripting
-----------------------------
=> Arma3 Alpha - Editing/Scripting General
=> Arma3 Alpha - Editing/Scripting Multiplayer
=> Arma3 Alpha - Editing/Scripting Resources Beta Testing & Submission
=> Arma2 - Editing/Scripting General
=> Arma2 - Editing/Scripting Multiplayer
=> Arma2 - Editing/Scripting Resources Beta Testing & Submission
=> ArmA - Editing/Scripting General
=> ArmA - Editing/Scripting Multiplayer
=> ArmA - Editing/Scripting Resources Beta Testing & Submission
=> OFP - Editing/Scripting General
=> OFP - Editing/Scripting Multiplayer
=> OFP - Editing/Scripting Resources Beta Testing & Submission
=> OFP Elite - Editing General
-----------------------------
Missions Depot
-----------------------------
=> Arma3 Alpha - Single Player Beta Testing
=> Arma3 Alpha - Multiplayer Beta Testing
=> Arma2 - Single Player Beta Testing
=> Arma2 - Multiplayer Beta Testing
=> ArmA - Single Player Beta Testing
=> ArmA - Multiplayer Beta Testing
=> OFP - Missions Beta Testing
=> OFPEC Campaign
=> Mission Discussion
===> Arma3 Alpha - Reviewed Missions
===> Arma2 - Reviewed Missions
===> ArmA - Reviewed Missions
===> OFP - Reviewed Missions
-----------------------------
Addons & Mods Depot
-----------------------------
=> Arma3 Alpha - Configs & Scripting
=> Arma3 Alpha - O2 and Models/Modelling
===> Arma3 Alpha - Texturing
=> Arma2 - Configs & Scripting
=> Arma2 - O2 and Models/Modelling
===> Arma2 - Texturing
=> Arma2 - Visitor 3 and Terrain Editing
=> Arma2 - Addons & Mods Beta Testing
=> Arma2 - Addons & Mods Discussion
=> ArmA - Configs & Scripting
=> ArmA - O2 and Models/Modelling
===> ArmA - Texturing
=> ArmA - Visitor 3 and Terrain Editing
=> ArmA - Addons & Mods Beta Testing
=> ArmA - Addons & Mods Discussion
=> OFP - Addons & Mods General
=> OFP - Addons & Mods Beta Testing
=> OFPEC Hosted Addons
Top of page