OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: penguinman on 14 May 2005, 22:14:11
-
could sombody make a script that makes the AT launchers have a smoke trail that follows the projectile all the way and then slowly fades
-
i think the ecp mod does this. ECP is the Enhanced Configuration Project. get it here:
http://ofpec.com/editors/ecfg/ (http://ofpec.com/editors/ecfg/)
-
maybe he just wants a script and not a MOD :)
-
indeed, and i dont want to make people d/l ecp if they want to play the mission
-
Ask the ECP people if they'll let you use it. Giving credit obviously.
-
does anybody know how to get the script for that out of ecp?
I have ecp and looked but cant find them
-
Hey,
I could do a scrip up for you if you like.
It probably mirrors the ECP method, but is of my own design and MOD free.
-Grendel
-
o cool even better
thanks man
-
Not a problem,
Shouldn't take too long as most of it is done already, just have to modify the drop particle size and duration and configure it for AT.
-Grendel
-
have you gotten a chance to work on it, is it almost ready?
-
Sorry for the delay, yes it is almost done.
-Grendel
-
Hey penguinman!
I guess that you were either unable to get the script to work or were not too impressed with the effects, but this script by bored_onion has been on the site for quite a while:
AT Weapons Graphics (http://www.ofpec.com/yabbse/index.php?board=27;action=display;threadid=20797)
Nemisis6 appears to have made another (improved) version and there is a link in the topic.
I made a version (with b_o's permission) that combined his AT graphics and AT dispersion scripts into one. If interested, I could post it so you could see if you like the overall effect.
Wadmann
-
I apologise for the delay again, but here you go:
add this line to the AT gunner's init or put in init.sqs with the units actual name in place of the <unit name here> of course:
<unit name here> addeventhandler [{fired}, {[<unit name here>, _this select 4, _this select 1] exec {mtrack.sqs}}]
Make a mtrack.sqs file and paste the following code into it.
;;;Modify and add any and all possible AT weapons in your mission to the _atarray...er array
;;;It IS case sensitive for upper lower case...
_atarray=["LAWLauncher","AALauncher","etc..etc"]
_man=_this select 0
_missile = nearestObject [_man, _this select 1]
_weapon = _this select 2
? !(_weapon in _atarray): exit
;;;Play with the following values until you are happy
;;;_is is Initial Size of smoke particle, _fs is final size, _lt is lifetime,
;;;_ds is density (1.275 is stationary, less will float up)
_is=random(.25)
_fs=random(.5)+.5
_lt=random(2.5)+2.5
_ds=1.27
;;;Here's the smoke trail loop:
#smoketop
_spd=speed _missile
~.01
drop ["cl_basic", "", "Billboard", 5, _lt, [0, 0, 0], [0, 0, 0], 0, _ds, 1, 0, [_is,_fs],[[1,1,1,1],[0,0,0,0]],[0],0,0,"","",_missile]
?(_spd>0): goto "smoketop"
exitThis SHOULD work...I haven't playtested it yet, but unless I screwed the code somewhere...
The only part you will have to do is play with the particle variables _is,_fs,_lt, and put the weapon names of the particular AT launchers you have in the mission into the array.
Let me know if this is working and if it needs any features added.
-Grendel
-edited script to make changing particle density etc. clearer, and fixed some obvious (duh!) errors that I missed when modifying the original script so as of this edit it should be good, but untill tonight I won't be able check...
-
well, im not good at EH inits so it might be somthing im doing but
it says mtrack.sqs is not found, and yes i put it in the mission folder and pasted that in the init and changed the name.
could you maby make a quik demo mission plz,,, just a man on desert island with a rpg.
, i need this script badly because otherwise the player cant see where the rpgs are being fired at his helo from.
thanks
-
Sure, I'll post a playtested demo for you over the next day or so...
I'm working on a intro cutscene from hell, and was up untill 5:00 AM...with a 6:30 wakeup for work...otherwise this would be done already.
-Grendel
-
Here you go...
It looks OK from the helicoptor's perspective, but from the side not so much...this is due to "meatballing" and maybe with a faster processor the smoke particles will look tighter...
At any rate, it works.
-Grendel
-
thank you so much! :)
but i absolutly have to know, for somthing else
how do you get the position of where a bullet hit the ground in a script.
-
That script makes my 2.6 ghz cry. I'm serious, I swear I can almost hear it cry out in pain.
-
That script makes my 2.6 ghz cry. I'm serious, I swear I can almost hear it cry out in pain.
You can edit it to have a longer wait time between particle effects...Honestly I don't know why it is sucking so much power from your 2.6!
I'm running a 1.5 (an aging Alienware, but a 1.5 none the less), and it didn't have any noticable effect.
-
didnt cause any lag for me, and i added more partical streams so it wouldnt look like little dots,
improved?