OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Blanco on 12 Jun 2005, 07:09:19
-
Hello,
One of the objectives in my mission is to destroy a radarpost, I've made a bunker with Mapfact bauelementen with the spinning radar on top of the roof. You have to enter the bunker, move up the stairs, get on the roof and blow it away. The hardest part is getting inside, it's a mission with adventure aspects.
Now everything works fine, there's only one thing I did'nt think about... You can destroy the radar with grenades (4) or an AT weapon.
Thing is...sometimes it's important (it's randomised) to get inside the bunker because there's some crucial information for your other objectives.
How can I solve this?
First I thought I place some trees around the bunker, but grenades fly through them.
Second, I can make the radar thougher to destroy, but how can I detect it's hit by a grenade or rocket?
Hit,dammaged EH's can't detect the weapon...
Third, A fired EH that detects when you throw a grenade in that area and delete it by impact.
That would look strange no? Can I make a fake explosion?
Fourth, drop the objective...
Any other suggestions?
-
you could use your fired event handler on units in that area to delete the ammo type if handgrenade, AT round etc
for aesthetic purposes you could then produce the same ammo type and cause its explosion at a safe point around the objective
alternatively if the mission is to get inside the building to recover some info, and then destroy the building , then have a script looping to repair the building until such a point that the info has been recovered
eg have a trigger over it that repairs it if its dammage >0.01 unless a boolean = false
so default state = repair trigger setdammaging 0
man enters building, this sets boolean to false or man places satchels using an addaction, which pv's a boolean to false
the trigger then stops running
a simple example
Trigger: Repeating
Condition: !tx_Manhasinfo && getdammage radar >0
On Activation setdammage radar 0
you could have a second trigger, much smaller than the first which runs on
Activation: Anybody
set to : Once
Condition: this
On activation:tx_Manhasinfo = true
alternatively, you give an addaction to an object setpossed to the top of your radar post which runs the same (tx_Manhasinfo = true)
-
there's a simpler option - if you want to disuade the player from a certain course of action, say so in the briefing, and end the mission if the player does it. use a killed event handler on the radar...
-
This does not feel like something that elaborate scripting will fix - you are bound to miss some other possibility. I am with bedges. Take away the random element in the bunker and tell they player they must go into it.
-
Yeah, trying to make something that would make the player miss the target no matter what/etc. would just be a bit too much ElectronicArts...
-
Lol, I agree with your comment about EA, Hater_kint :D
I don't give up that fast...
Right now, the radar can't be destroyed by a grenade. I did it with a hit EH. The max damage a grenade (direct hit)can cause is 0.4 and you can only throw 1 nade at the same time, it's a SP mission and you play alone ,
Unfortunatally, when the radar is destroyed by a satchel, dammage is 3.5 or more, a direct hit from a rocket causes a similar damagevalue.
This prevents the radar can be destroyed by a grenade
; checkimpact.sqs
_whoshit = _this select 0
_bywho = _this select 1
_howmuch = _this select 2
?_bywho == player && _Howmuch > 0.2 && _howmuch < 0.4 : _whoshit setdammage 0
exit
Now I'll gonna give Terox methode a try.