OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: registered_fugitiv on 07 Jan 2003, 00:05:50

Title: GUN RUN
Post by: registered_fugitiv on 07 Jan 2003, 00:05:50
i dont kno if sum one has done this but im making a mision where like on BHD wherre 2 AH-6 helicopters come along and do a gun run i havnt been able to do it wit waypointing cause they go past the enemy first then return but when they shoot they hover and it dont look good is it possiblt to simulate fire from the AH-6s so it looks like its hiting da ground.
hope u kno wat im talkin bout
Title: Re:GUN RUN
Post by: Pandoz on 08 Jan 2003, 07:18:58
yes...i know exactly what u are talking about i am guessing that u could prolly use the getpos to get the helis position then use setpos and camcreate to create the bullets hitting the ground...then if u have resistance u can create many in a .001 second sequenced loop or something and have them using setvelocity so u actually see them hitting dirt..i dunno just a thought but im not much of a scripter
Title: Re:GUN RUN
Post by: Josef on 10 Jan 2003, 19:46:44
how about using the spray and pray script, i heard bout it...
Title: Re:GUN RUN
Post by: Pandoz on 24 Jan 2003, 04:00:47
hmm im actually done with a beta...but i dont know how to do it so that the helis direction is detected, then passed onto the script so the bullet line then detects that angle and moves the bullet line to the target....ummm that make any sense...like watch



[HELI]  <---that heli   that guy----> [GUY]

i want the script to detect the heli going at the guy then once its near enough i want the line of bullets to start between the heli and guy...but i have NO CLUE how to do this? i need it to detect any angle/direction of the heli to the guy? is any of this remotely possible?
Title: Re:GUN RUN
Post by: Josef on 25 Jan 2003, 01:31:15
OK this could be a way to do it, you make a script that make the heli target an invisible helipad, then as a #loop make the heli constantly fire, you have it target a second invisible helipad, thus making a gunrun over the targets, when the helicopter have passed just make the script end...

Don't have a clue of how this is really done in the .sqs, but if someone makes it ill want it ;D
Title: Re:GUN RUN
Post by: Pandoz on 26 Jan 2003, 05:10:45
hmmm well the only problem with that is he isnt really doing a gunrun then...he is just shooting at the ground and will only kill the target if the target runs into the fire...the scripted way uses camcreated bullets which garentee a hit and kill and u can make them timed perfectly also
Title: Re:GUN RUN
Post by: Josef on 27 Jan 2003, 19:38:15
No fun knowing what will happen :'(

And the miniguns high rate and dispersion should make casualties, trust me ;D
Title: Re:GUN RUN
Post by: registered_fugitiv on 27 Jan 2003, 22:17:19
hey cool ur actully doing 1 thanx heaps
wish i could help but im not good at scripting
Title: Re:GUN RUN
Post by: Pandoz on 28 Jan 2003, 17:11:40
i have the script totally done...but the gunrun line of bullets only start from the East and goes West...so maybe if u could have a heli fly that way or just show the heli flying then only show the gunrun bullets it would look good...OR u could go back and edit the y and x numbers in the script to change which direction the bullets went...ur call ill prolly just post it in the editors depot...u want me to make it work from any direction? there will need to be 4 scripts if so
Title: Re:GUN RUN
Post by: Josef on 28 Jan 2003, 21:17:57
Why not make it have a [unitname,weaponname,directionindegrees] exec "gunrun.sqs"
Title: Re:GUN RUN
Post by: registered_fugitiv on 28 Jan 2003, 22:36:38
umm yea should make it like that if u can or the four scripts but i only need it for going from south to north i think
Title: Re:GUN RUN
Post by: Pandoz on 14 Feb 2003, 05:52:14
i tried that josef it makes it pretty strange since the bullet lines are individual bullets only sync on a user deifined timer...therefore there is no line passing through the center in which u could define direction...that is the only problem i am having is the direction nonsense and until i figure it out the script is scrapped.
Title: Re:GUN RUN
Post by: Josef on 18 Feb 2003, 17:47:24
I would love to have the East to West script, I make a mission, and what a coincidence, East West is perfect....


Could you post the script?
Title: Re:GUN RUN
Post by: Josef on 16 Mar 2003, 10:16:27
HELOO?

Is anyone posting this great script ???
Title: Re:GUN RUN
Post by: Terame on 17 Mar 2003, 06:49:08
What a fantastic script idea!!!

Keeping a watch on THIS forum! :)
Title: Re:GUN RUN
Post by: Pandoz on 08 Apr 2003, 06:02:25
umm sorry i hadnt been active for a long time...the basic jist of my script was really simple...ummm didnt remember to back up my scripts when i cleaned up my harddrive so they gone now...but they sucked anyway but heres the basic.

_target= _this select 0
_delay= _this select 1

_bullet = "Bullet12_7" CamCreate [(getpos _target select 0)+4, getpos _target select 1,(getpos _target select 2)+2]
_bullet setVelocity [-100,0,-200]
~_delay

_bullet = "Bullet12_7" CamCreate [(getpos _target select 0)+3., getpos _target select 1,(getpos _target select 2)+2]
_bullet setVelocity [-100,0,-200]
~_delay



I have made a VERY QUICK AND CHEAP test map to go along to give ya the idea....just use the 0-0-??? commands to get them to start and watch the guys fall
Title: Re:GUN RUN
Post by: titan on 15 Apr 2003, 12:59:37
cldnt u put in a command that wld find the dir of the heli, then change the camcreated bullets accordinly?!

also wldnt the heli need to be aiming downwards, as in if u just have it flying normally with a script running off it then it wld fly with its nose horizontally!
Title: Re:GUN RUN
Post by: Flapje on 15 Apr 2003, 16:37:45
that script... is just plain cool! but is it NECESSARY to make it a radio?
EDIT: okay, stupid question *ignore*
Title: Re:GUN RUN
Post by: titan on 15 Apr 2003, 18:35:33
he he he, got bored so i started to alter the script, exchanged the bullets for cannon30he, then shell120 (sabot rounds)  lol
Title: Re:GUN RUN
Post by: Pandoz on 28 Apr 2003, 17:55:11
ummm to the pitch of the heli question...yes at one point in time i had the finddir thing in there...but it SCREWED it up bad...so 99% says that it was my sequences that screwed it up...plus my lack of experience. You could do the whole pitch of the heli thing but ive lost interest in this script so go for it if u want to.
Title: Re:GUN RUN
Post by: Josef on 29 Apr 2003, 14:52:26
I think the best way would be to make the gunner(Combat) fire all the time, while sweeping the aim from one Game Logic to another, perfectly customizable...

And then have the pilot on Careless...
Title: Re:GUN RUN
Post by: Iwesshome on 29 Apr 2003, 15:08:53
Yeah that would probably work also.... scripts, scripts, scripts and all it takes is one man  ;)