OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: penguinman on 14 May 2005, 22:14:11

Title: rocket launcher smoke
Post 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
Title: Re:rocket launcher smoke
Post by: Morglor9 on 15 May 2005, 03:50:13
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/)
Title: Re:rocket launcher smoke
Post by: oyman on 15 May 2005, 04:57:19
maybe he just wants a script and not a MOD :)
Title: Re:rocket launcher smoke
Post by: penguinman on 15 May 2005, 21:31:50
indeed, and i dont want to make people d/l ecp if they want to play the mission
Title: Re:rocket launcher smoke
Post by: macguba on 15 May 2005, 22:27:48
Ask the ECP people if they'll let you use it.    Giving credit obviously.
Title: Re:rocket launcher smoke
Post by: penguinman on 17 May 2005, 20:27:06
does anybody know how to get the script for that out of ecp?

I have ecp and looked but cant find them
Title: Re:rocket launcher smoke
Post by: Grendel on 18 May 2005, 18:28:29
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
Title: Re:rocket launcher smoke
Post by: penguinman on 19 May 2005, 02:16:07
o cool even better

thanks man
Title: Re:rocket launcher smoke
Post by: Grendel on 19 May 2005, 23:28:11
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
Title: Re:rocket launcher smoke
Post by: penguinman on 23 May 2005, 01:32:08
have you gotten a chance to work on it, is it almost ready?

Title: Re:rocket launcher smoke
Post by: Grendel on 24 May 2005, 17:14:14
Sorry for the delay, yes it is almost done.

-Grendel
Title: Re:rocket launcher smoke
Post by: Wadmann on 24 May 2005, 20:55:16
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
Title: Re:rocket launcher smoke
Post by: Grendel on 25 May 2005, 17:52:21
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.

Code: [Select]
;;;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"

exit
This 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...
Title: Re:rocket launcher smoke
Post by: penguinman on 26 May 2005, 18:45:58
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
Title: Re:rocket launcher smoke
Post by: Grendel on 26 May 2005, 18:50:29
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
Title: Re:rocket launcher smoke
Post by: Grendel on 27 May 2005, 05:45:14
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
Title: Re:rocket launcher smoke
Post by: penguinman on 27 May 2005, 06:19:44
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.
Title: Re:rocket launcher smoke
Post by: Nemesis6 on 30 May 2005, 21:36:19
That script makes my 2.6 ghz cry. I'm serious, I swear I can almost hear it cry out in pain.
Title: Re:rocket launcher smoke
Post by: Grendel on 31 May 2005, 21:08:29
Quote
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.
 
Title: Re:rocket launcher smoke
Post by: penguinman on 02 Jun 2005, 03:19:41
didnt cause any lag for me, and i added more partical streams so it wouldnt look like little dots,

improved?