bertfallen 10 Posted November 20, 2009 Now then I have a few requests script wise these might be pretty big requests I'm not sure myself I'm new to scripting. (Despite having this game since release). Script 1: Bomb Camera I want an enemy convoy to be hit by an A-10 but I want the camera to follow a bomb as it is dropped from the aircraft and then hits its target. I've tried looking through the triggers tab but can only change the camera view for a short time and fixed onto a certain object. Is this possible to do? and if so, how? Script 2: Helicopter insertion/exertion I want two helicopters to drop off two teams on an island, I want them to fly relatively low (to simulate avoiding radar) and then rather then land at the insertion part, to hover at a very low altitude to allow the teams to exit the helicopter without receiving damage. I do however have a feeling I can do all of this with this flyinheight just not had a proper chance to test this. Script 3: UAV/AS (Unmanned Air Vehicle/Air Support) I want the player to be able to use a computer or other such object to take control of a UAV the player will be required to make the UAV airborne, but can use the UAV to call in laser guided missiles and possibly artillery support. Few questions regarding this: 1) Is this possible? 2) Will I have to have an aircraft flying around with the laser guided missiles? (See: for details)3) Would it be possible to have the player set down way points on the map for the UAV to follow? I respect that some of these may be huge undertakings, my knowledge in scripting is minimal - nil so please go easy on me :( Share this post Link to post Share on other sites
Sepe 1 Posted November 21, 2009 Hi, For the second question: Yes, you can make the choppers fly at a set height with the flyinheight command. Make sure you set it a couple meters over any buildings or trees in the area though, or the AI might crash. If it's an open area you should be fine. For the landing part, you can use the "land" command: chopper land "GET OUT" The land command has three modes, which are "land" (stop on the ground, engine off), "get in" (hover very low so that units can get out) and "get out" (hover low enough, at about 1,5m for units to get out without damage). In this case, "get out" is propably the best. Make sure you place a helipad object (if you don't want it to be visible, there's an object called H (invisible)) to make sure the chopper lands where you want. Share this post Link to post Share on other sites
sanctuary 19 Posted November 21, 2009 For the bomb cam question : Select the whole code line, press on your keyboard CTRL + C in the same time, and inside the mission editor , in the A10 initialisation line, press CTRL + V in the same time to copy paste it without having to retype all manually : this addEventHandler [{fired}, {if ((_this select 1 in [{Throw},{LaserGuidedBombLauncher}])) then {_this exec {LGBcam.sqs}}}] In your whatevermissionname folder from your ...User\YourUsername\Missions folder , create a new text file . And inside this new text file , copy paste : _airplane=_this select 0 _lgbomb=nearestobject [_airplane,"LaserGuidedBomb"] _pos=getpos _lgbomb _camera = "camera" camCreate [(_pos select 0),(_pos select 1), (_pos select 2)] _camera cameraEffect ["internal","back"] _camera camsettarget _lgbomb _camera camcommit 0 @camCommitted _camera #camloop _pos=getpos _lgbomb _camera camsettarget _lgbomb _camera camsetRelpos [0,-8,2] _camera camcommit 0 ?(alive _lgbomb): goto "camloop" #end _camera cameraeffect ["terminate", "back"] camdestroy _camera exit Save the changes and rename your new text file into LGBcam.sqs That's all, when the A10 will launch an LGB there will be a camera following it to the impact. Share this post Link to post Share on other sites
bertfallen 10 Posted November 22, 2009 For the bomb cam question :Select the whole code line, press on your keyboard CTRL + C in the same time, and inside the mission editor , in the A10 initialisation line, press CTRL + V in the same time to copy paste it without having to retype all manually : this addEventHandler [{fired}, {if ((_this select 1 in [{Throw},{LaserGuidedBombLauncher}])) then {_this exec {LGBcam.sqs}}}] In your whatevermissionname folder from your ...User\YourUsername\Missions folder , create a new text file . And inside this new text file , copy paste : _airplane=_this select 0 _lgbomb=nearestobject [_airplane,"LaserGuidedBomb"] _pos=getpos _lgbomb _camera = "camera" camCreate [(_pos select 0),(_pos select 1), (_pos select 2)] _camera cameraEffect ["internal","back"] _camera camsettarget _lgbomb _camera camcommit 0 @camCommitted _camera #camloop _pos=getpos _lgbomb _camera camsettarget _lgbomb _camera camsetRelpos [0,-8,2] _camera camcommit 0 ?(alive _lgbomb): goto "camloop" #end _camera cameraeffect ["terminate", "back"] camdestroy _camera exit Save the changes and rename your new text file into LGBcam.sqs That's all, when the A10 will launch an LGB there will be a camera following it to the impact. Hmm that doesn't appear to work, no errors at all, just doesn't work o.o I'm using the MCM-SLX add on mod if that's any help. I have yet to try the Helicopter one, but thanks to both of you :) Share this post Link to post Share on other sites
sanctuary 19 Posted November 22, 2009 If you are sure you are using the script correctly, it is possible that MCM/SLX may have changed the original ammo/weapons class names into something else. As i have no idea what those mods have done to the class names, i can't help there. But on an A10 using BIS orignal weaponry, the script works perfectly. Share this post Link to post Share on other sites
bertfallen 10 Posted November 22, 2009 If you are sure you are using the script correctly, it is possible that MCM/SLX may have changed the original ammo/weapons class names into something else.As i have no idea what those mods have done to the class names, i can't help there. But on an A10 using BIS orignal weaponry, the script works perfectly. I will try it on the original ofp in a second, if it is a case of the mod having the names changed, is there a way to look them up? Share this post Link to post Share on other sites
bertfallen 10 Posted November 28, 2009 Okay update, got the A-10 to work in the original version, so its clearly due to MCM-SLX (Still trying to find out what the ammo is named in that). Anyway both of those work fine, but is there any update on the 3rd Script? And I do have another I'm gonna need help with but I will wait and see about that 3rd one first. Share this post Link to post Share on other sites
Mok Sith 0 Posted December 28, 2009 Okay update, got the A-10 to work in the original version, so its clearly due to MCM-SLX (Still trying to find out what the ammo is named in that). you can use PBOX for that... http://tactical.nekromantix.com/tactical/wiki/doku.php?id=ofp:tools:pbox it will allow you to view then config.cpp without having to unpbo it... from there just find out what the maker named his weapon/ammo/vehicle Share this post Link to post Share on other sites