OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: shadow99 on 02 Jul 2004, 07:10:00
-
Hokay. So, I have five Higgens Boats heading into the beach at Saint Pierre, but more often than not an unsatisfactory amount will get blown up by V-80s, sometimes including the player.
I checked through the command reference to find a command that could go in these two V-80's init fields, to ignore the five Higgens Boats.
Except, I want nothing else too. Only those two V-80s. Anyone have any ideas?
-
Do you want the V-80s to destroy anything at all during the higgens ride?
-
First, the higgins boat is an old WWII Landing Boat. The V-80 wasn't even officialy done 1985. See the connection? Use Zodiacs or what they are called for landing boats.
Second, to avoid that the boats get blown away before reaching the beach, you can use the setcaptive command. Check it up.
:beat: *Gets Shot* :beat:
-
Thanks to both of you. But Armstrong, as for your 'PC'-ness, do you mind if I take a bite at you?
Considering there was no fighting in the Cold War at all, and Flashpoint is entirely a work of fiction, with the default islands probably not even exsistence (I think I've heard of Malden, I'm not sure), I don't see how having a few Higgens Boats hurts.
Especially since Zodiacs don't stop two groups of easterns on the beach from slaughtering everyone on board before they hit the beach. ;D
But anyway, thanks for the advice. I'm going to look up that command now...
-
setCaptive is an extremely useful command but it will make nobody shoot at the boats.
You could get really cute and add an eventHandler "hit" to the boats which detects if they are hit by the choppers and repair them if they are, but I think a better solution would be to reduce the chopper's skill and ammunition and give them a less advantageous starting position.
If all else fails of course you could lose one of the choppers. ::)
Malden isn't real (it's based on the Ionian island of Levkas), (http://www.theavonlady.org/theofpfaq/) though there is a suburb of London called Malden.
-
...Considering there was no fighting in the Cold War at all...
Yes there was. The British SAS and the American army trained and supplied the Mujahdean in Afghanistan to fight to Soviet army.
As for the choppers attacking the boats, I had a similar problem when creating my Fortress mission, unfortunately there is no setAmmo command which would solve the problem. What you could do is in the waypoint for the V-80s is set their behaviour to Never Fire and in their next waypoint for after the boats have landed give set the behaviour to Open Fire or Open Fire Engage At Will.
-
@ Acid
unfortunately there is no setAmmo command which would solve the problem
Look at the unit in the editor and there is a slider bar that will allow you to reduce the ammo of a unit at the start of a mission. You could set it anywhere from full to zero.
Wadmann
-
Maybe you can use a temporaly fire dispersion script... They shoot but they don't hit anything.At least that's how I should solve the problem.
Put this in your V80's init :
This addeventhandler ["fired",{_this exec "fd.sqs"}]
And this in a init.sqs
dispersionoff = false
When you want to stop the dispersion script put
dispersionoff = true
in a waypoint, trigger or script.
Here is fd.sqs by GeneralCoder
;;fd.sqs
_shooter = _this select 0
_projectile = nearestObject [vehicle(_shooter), _this select 4]
?dispersionoff : _shooter removeEventHandler ["fired",0];exit
?(_shooter == player): exit
?((_this select 2) == "throw"): exit
_vel = velocity _projectile
_speed = speed _projectile
_disp = (_speed * (0.03 - (skill _shooter)/100) )
_dispX2 = _disp*2
_projectile SetVelocity [(_vel select 0) - _disp + Random(_dispX2),(_vel select 1) - _disp + Random(_dispX2),(_vel select 2) - _disp + Random(_dispX2)]
If you want more dispersion change 0.03 in this line
_disp = (_speed * (0.03 - (skill _shooter)/100) )
...in a higher value
Let me know if it works.
-
Hang on, I'm still a noob, so I'm stuck with init.sqs side of things.
Is it a file I manually make in this game's save directory?
I think I get the rest, though.
-
init.sqs is a separate file. Create it in Notepad or another text editor (or copy the one in the Tutorial Mission, which also has templates for the other separate files you need) and make sure it is named correctly. (ie not init.sqs.txt) It goes in the mission folder next to the mission.sqm
snYpir wrote a very good tute called How to use Objectives and init.sqs.
-
@ AcidLook at the unit in the editor and there is a slider bar that will allow you to reduce the ammo of a unit at the start of a mission. You could set it anywhere from full to zero.
No, read what I wrote again, i said there is no setAmmo command, not that you can't set the initial ammo level. I'm referring to a command that functions like setFuel and setDammage whereby you can use the values of 0 and 1 to disarm the unti, then rearm it later. That command doesn't exist. I already know about the slider, i've known about it ever since OFP first came out when i first started making missions.
-
@Acid
I have reread your post and would like to add to my original comment. You are correct in stating that there is no "setammo" command. In the editor you may initially set the ammo of a unit to zero, then in a trigger or waypoint you could use the "addMagazine" command to then add the correct amount of ammo that you desire.
Some peeps come here with no knowledge whatsoever, and other arrive with plenty of knowledge but sometimes overlook a different way of arriving at a solution. I was merely pointing out a different way (although I did not explain it in detail) to arrive at the same destination. Sorry if I offended you and your editing skills. :-*
Wadmann
-
That sounds like the solution.
Find the V80's weapons and remove them and once the boats land, rearm them with addmagazine.
But I like Blanco's idea. 40mm rockets and AT6 missiles landing next to me really makes the atmosphere go through the roof. :)