OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: PE4 on 18 Jun 2006, 14:09:17
-
Ok couldn't find this anywhere because I didn't know how to wprd the search, as such apologise if it's been answered already somewhere else!
I want a trigger to work, in this case air support, but not until a certain area has been cleared of AA. How would I do it?
I am a complete biff at this so would like some nice clear instructions if poss please! :P
Know this is probably a relatively simple thing but not up on the jargon!
-
first, in the init.sqs file create a global variable by typing
go_airsupport = false
create the first trigger covering the area which needs to be cleared. make the conditions for whichever side not present. in the 'on activation' box type
go_airsupport = true
create the second trigger, doesn't need any size, make its type 'switch', and in the 'condition' box type
go_airsupport
to summarize, the variable go_airsupport is initially false. as soon as the area is cleared, the trigger will set go_airsupport to true, which will cause the second trigger to activate.
-
Please clarify your question. What would be interesting to know:
What kind of AA you have (AA Soldiers, Shilka/Vulcan, both or others)?
How many AA units are in the area?
The most simple way is, in case of a singel AA unit (nvm Soldier or tank)
Name the AA unit, as example "MyAAunit"
trigger size 0/0
in condition field:
?! (alive MyAAunit)
in on activation: whatever should happen eg starting a script ([] exec "airstrike.sqs")
with 2 or more AA units you can use this:
gieve every AA unit a name ("MyAAunit1", "MyAAunit2" and so on)
in condition field:
? (! alive MyAAunit1) AND (! alive MyAAunit2)
i guess you get the point.
-
Ok, what I meant was.
The player goes into an area, where he has to take out an AA unit, once the AA unit is obliterfried the option to call in an apache appears on the 0-0 menu.
The air support is not a script thing, just waits somewhere else on the map until the player calls (basically a movein order for pilot and gunner).
I just need to know how to make it so once the first trigger is activated it allows the second one to be used. No fancy stuff real basic boring crap! I know there'lll be a billy basic way of doing it (and that's the one I need!).
-
hmmm....i don't think you can set up a radio trigger which appears only once the AA is dead....it will be visible from the beginning.
If it's okay if the radio is visible from the beginning you could try this:
name your AA unit, as example: myAAunit
trigger:
size: 0/0
repeatedly
radio Alpha (or whatever you like)
type: switch
codition: this AND (! alive myAAunit)
for the chopper set a few waypoints, at least one at the far side of the island, which will be his waiting point. A "move" waypoint should work, else try "hold".
Now just synchronize the trigger with this waiting waypoint.
What we've done? the trigger will only fire once the AA is destroyed and the player activated the radio 0-0-1 or whatever.
It will not fire when radio is activated but AA still alive or vice versa.
An other solution could be to action which will only be there once the aa is destroyed. But this would need scripting and is a little more complicated, but would ensure the player has the option only as soon the AA is destroyed.
-
i don't think you can set up a radio trigger which appears only once the AA is dead....
not quite true. set up the radio trigger as normal, and in the init.sqs file put
1 setradiomsg "null"
once the AA is dead, in the 'on activation' box of whichever trigger senses the AA is dead put
1 setradiomsg "Call in Air Support"
-
...and again learned something new, thx bedges.
one question about this:
1 setradiomsg "null"
does the number refer to the radio trigger, so "1" is radio alpha, "2" is radio bravo and so on?
-
indeed. see attached missionette.
[attachment deleted by admin]
-
Thanks guys! Will try this when I get into OFP again!
Thanks for helping Mr no knowledge! ;)
-
i've tried this thing...unknown operator "setdamage"
???
-
it should be
setdammage
Note 2 m's
Ben
-
it can be either (http://www.ofpec.com/COMREF/index.php?action=list&letter=s#setDamage). bis accounted for the spelling error, although not with the getdammage command.
i've tried this thing...unknown operator "setdamage"
what script is it coming from? post here please and we'll take a look.
-
bedges, i've opened your example mision that you've attached to one of your posts here. i tried to edit a trigger (in editor), without changing anything, and when i click on OK, it says: unknown operator "setdamage".
if i try to enter the game, and use radio to destroy shilka, an error occurs in upper left part of the screen.
edit: setdaMMage works, tnx Ben.
another objection: when i put
1 setradiomsg "null"
i still have "Alpha" on the radio menu. i've tried this even with copying the mission in sigle missions folder, but its the same.
-
what version of flashpoint are you running?
-
1.30 :-\ is that bad?
-
not bad, by any means. but not optimal either. many scripting commands were introduced around 1.5, setdamage being one of them.
you may be able to get free upgrades from BIS (http://www.flashpoint1985.com/download/index3.html), and if not, amazon can sell you goty resistance (1.96) edition for a very reasonable price.
-
In the meantime you could still upgrade for free to 1.46 instead of 1.30.
Planck
-
tnx guys. btw, this forum is great :)