OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Mr. S.A.S on 01 Feb 2004, 19:52:52
-
I am trying to make a blackhawk look like an RPG has exploded near it. I have only been able to create a shell inside it so far, but I only want it to explode near it. :help:
-
For this example i named the AH64 "chopper"
RPG = "HEAT120" camCreate [getpos chopper select 0, (getmarkerpos chopper select 1) +5]
i think this should do the job
-
Youll need more.... Youll need to create 2 shells at the same time, in the same place for the explosion. If you only create 1 shell, it wont blow up, just fall to the ground. 2 at a time and they will destroy eachother and explode at the moment of creation. Again, well name your helo "chopper"...
rpg="heat105" camcreate [(getpos chopper select 0)+5, getpos chopper select 1,getpos chopper select 2]
rpg="heat105" camcreate [(getpos chopper select 0)+5, getpos chopper select 1,getpos chopper select 2]
or
rpg="heat105" camcreate [(getpos chopper select 0)-5, getpos chopper select 1,getpos chopper select 2]
rpg="heat105" camcreate [(getpos chopper select 0)-5, getpos chopper select 1,getpos chopper select 2]
or
rpg="heat105" camcreate [getpos chopper select 0, (getpos chopper select 1)+5,getpos chopper select 2]
rpg="heat105" camcreate [getpos chopper select 0, (getpos chopper select 1)+5,getpos chopper select 2]
You get the idea....North, South, East, West are select 0 and select 1.....Up and Down are select 2 ....
(+)numbers will add meters to the position in one direction...
(-) numbers is the opposite direction
With altitude...
(+)numbers are up
(-)numbers are down
getmarkerpos is for markers ::)
or you can use Createvehicle instead of Camcreate.
-
Youll need more.... Youll need to create 2 shells at the same time, in the same place for the explosion. If you only create 1 shell, it wont blow up, just fall to the ground.
That's incorrect. You only need to create one shell. If you want a shell to explode in the air, then you need two.
"shell73" camcreate position is all you need.
-
I am trying to make a blackhawk look like an RPG has exploded near it. I have only been able to create a shell inside it so far, but I only want it to explode near it.
Quote:Youll need more.... Youll need to create 2 shells at the same time, in the same place for the explosion. If you only create 1 shell, it wont blow up, just fall to the ground.
That's incorrect. You only need to create one shell. If you want a shell to explode in the air, then you need two.
"shell73" camcreate position is all you need.
Actually, it is correct....youll see that an explosion next to the flying helo is exactly what Mr S.A.S is wanting....
"shell73" camcreate position will create the shell inside of the helo, destoying it, which is what MR. S.A.S doesnt want....
Hes looking for near misses, maybe even flak with the way he descibed. Hes already created a shell inside of it.
Lookout for shock damage from the blast Mr S.A.S, it could still take out the helo. Just set the explosion further away until you get a non-damaging explosion.
-
Hes looking for near misses, maybe even flak with the way he descibed. Hes already created a shell inside of it.
Actually, it is correct....youll see that an explosion next to the flying helo is exactly what Mr S.A.S is wanting....
He didn't say anything about flak. In fact, he gave no indication if the chopper was in the air or on the ground. But an rpg will not explode in the air so I assumed the heli to be on the ground. But we don't know because he didn't tell us.
"shell73" camcreate position will create the shell inside of the helo, destoying it, which is what MR. S.A.S doesnt want....
the "position" in the above statement is anywhere you want it to be. I didn't necessarily mean it to be the chopper's position. It's just an example.
-
;) Ellöw, Mr. SAS m8
what YOU need is a FLAK scroll - just modify it to fit yer needs
(i.e. only ONE explosion and not repeated ones)
:-* check this out: this one uses a "shell73" which is a very small explo.
===================================
;parameters:
;area of flak around target
;random height of flak
;target aircraft
;game logic name
;ammoType to use
;example
;[150,10,blackhawk,log1,"shell73"] exec "flak.sqs"
======================================
; script
_area = _this select 0
_height = _this select 1
_target = _this select 2
_logic = _this select 3
_ord = _this select 4
#loop
_where = getpos _target
_logic setpos [(_where select 0) - random _area + random _area, (_where select 1) - random _area + random _area, (_where select 2) + random _height +10]
_bomb = _ord camcreate getpos _logic
_bomb = _ord camcreate getpos _logic
; here you can EXIT the script if you don't want repeated explosions.
; exit
~random 1.3
? alive _target: goto "loop"
====================================
copy the script to yer mission folder, let it be fired by a command similar to this (could be in a trigger) :
[150,25,MyHeli,log1,"shell73"] exec "flak.sqs"
("MyHeli" is the unitName of yer helicopter, gah! :P and "log1" is just a named gameLogic ::) ) ;D
hope it helps,
later! :-*
(cred's to scriptAuthor: Pica)
-
Thanks for all your help, now I'll put an end to this argument.
a)RPG's can explode in mid-air
b)The chopper is in the air *surprise*
In case you haven't guessed, this is for a blackhawk down mission *surprise again*
Now does anyone have good tailrotor script for after the explosion? It's for a scripted intro, so I don't want any variables or crap. Also, in the intro I have a camera that was created in a trigger, but I then want to use a script to control the camera, everything I have tried so far has failed miserably.
Please Help!
-
The only place I know of that has tail rotor faliure scripts is here and the ED Depot isn't up yet I think... :(
But try all the other sites, just type in the game at a search engine and try the OFP websites one by one.
To narrow your search, try BAS cause I thought I heard something about a heli that's tail rotor could fail or they had scripts for it.....
As for RPGs exploding on impact, there are two ways you can mess with RPGs.
1.) Leave it as is in the game and it explodes on contact.
2.) Like in the real BHD the milita guys had their RPGs fixed by Islamic Extremist soldiers who fought Russian helicoters before, so the rpg has a timed fuse on it to create a kind of airburst so the blackhawks would not need to be hit directly.
-
I have the tailrotar script on my HD, if you want, I could email you it no prob..
Just let me know!
- Ben
-
ECP includes a tail rotor failure script. The Ed Depot is partly working, follow the link in my signature line.
-
haven't tried the ECP scroll yet (though I have the addon) but I can tell this much:
that the script in the depot (I think it was made VERY long ago by...Vektorboson, most likely). And at that time it was frikkin brilliant but I must confess that it has its limitations, so I certainly hope the ECP tailscroll is an improved version! :)
-
heres the script I have :
; tail-rotor fail script by Vektorboson
; SYNTAX
; [CHOPPER, <RANDOMKILLS, MAXKILLS>] exec "effects\tailrotor.sqs"
; CHOPPER is the helicopter
; RANDOMKILLS is either true or false (random people are killed)
; MAXKILLS is maximum of randomkills
_heli = _this select 0
_random = true
_maxkills = 4
?count _this == 2: _random = _this select 1; _maxkills = 4
?count _this == 3: _random = _this select 1; _maxkills = _this select 2
; Position of helicopter engine (adjust this for different helicopters!)
_enginePos = [0, -3, 1]
drop ["cl_fire", "", "Billboard", 1, 1, _enginePos, [0,-3,1], 0, 1, 1, 0.001, [1,5], [[1,1,1,1],[1,1,1,0]], [0], 0.1, 0.2, "", "", _heli]
~0.05
drop ["cl_fire", "", "Billboard", 1, 1, _enginePos, [0,-3,1], 0, 1, 1, 0.001, [1,5], [[1,1,1,1],[1,1,1,0]], [0], 0.1, 0.2, "", "", _heli]
~0.02
drop ["cl_fire", "", "Billboard", 1, 1, _enginePos, [0,-3,1], 0, 1, 1, 0.001, [1,5], [[1,1,1,1],[1,1,1,0]], [0], 0.1, 0.2, "", "", _heli]
_AddDir = 0.1
~(random 1)
#loop
_dir = getDir _heli
?_AddDir < 5: _AddDir = _AddDir + 0.05
_heli setDir (_dir + _AddDir)
_v = Velocity _heli
_heli setVelocity [((_v select 0) / 1.001), ((_v select 1) / 1.001), -5]
drop ["cl_basic", "", "Billboard", 7, 7, _enginePos, [0,0,0], 0, 1, 1, 0.001, [1,5], [[0,0,0,0],[0,0,0,0.7],[0,0,0,0]], [0], 0.1, 0.2, "", "", _heli]
~0.01
?getPos _heli select 2 > 2: goto "loop"
?alive _heli: _heli setDammage 0.8; _heli setFuel 0
?!alive _heli: exit
?!_random: exit
; now the randomkills
_crew = crew _heli
_c = count _crew
_i = 0
_kills = 0
#crew
_unit = _crew select _i
?random 1 > 0.8 && _unit != player: _unit setdammage (random 1)
?random 1 > 0.8 && _unit != player && _kills < _maxkills: _unit setdammage 1; _kills = _kills + 1
_i = _i + 1
?_i < _c: goto "crew"
It is the one writen by Vektorboson...
It works okay, I guess.. But I'm sure someone could write a much better one know, with all the new jumped up commands in 1.96 :) Or even just modify that one?
- Ben
-
I have modified the tail rotor script myself, im not going to post it here because it will be in ECP very soon.
All i've done is add the following effects:
If the player is in the chopper the screen blacks out and the
player finds himself lying on the ground, he should get up and run quickly.
The chopper can explode anywhere from the instant it touches the ground to 60 seconds later and it has a 20% chance of not exploding.
It is designed to work with ECP so keep your eyes out for the next version.