Jump to content
bn880

Bn880's Tracers V1.0

Recommended Posts

Great.

I think I'll implement this in the next EECP release if there are no objections.

Share this post


Link to post
Share on other sites

No objections, it can be tricky to implement in a mod based on carried weapon types however. (if that is your plan, if not I will do a tiny overview for other mod makers)

You will have to wait a few seconds at the start of each mission (like 3s) to begin checking primaryWeapon of each unit, depending on the result of the primary weapon you will want to add the unit to a list of units and their desired tracer properties.

Once this list is fully assembled, use it to call addTracerUnit, in order, from a function.

Remember, in multiplayer the order in which addTracerUnit is called matters, and it will always match if you use a function started by the init EH.

There are various tricks one can do like performing the work of addTrecerUnit in your mod, and then calling {\bn_tracer\addTracerUnit2.sqf} with that pre-formed list. This skips a second 3s delay before tracers are added. It really depends on how much control you need in a mod.

That's all for now.

Share this post


Link to post
Share on other sites

Thanks for the info.

Currently I have it set up very simply (Man class init EH calls a script which checks the unit type and either exits or executes addTracerUnit.sqf with several different parameters depending on the unit.)

It works fine for testing, but I may do as you say and make it weapon-specific before release.

Share this post


Link to post
Share on other sites

Heh , what about to add only this line in the class man:land as init ? wink_o.gif

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">"[_this select 0,2]call loadFile""\bn_tracer\addTracerUnit.sqf"";

It perfectly works here , btw it will be implemented in the incoming FFUR release too smile_o.gif

Regards

TB84

Share this post


Link to post
Share on other sites
Heh , what about to add only this line in the class man:land as init ? wink_o.gif
Quote[/b] ]"[_this select 0,2]call loadFile""\bn_tracer\addTracerUnit.sqf"";

It perfectly works here , btw it will be implemented in the incoming FFUR release too smile_o.gif

Regards

TB84

Because if you do that, every weapon will have tracers. You don't want tracers coming out of sniper rifles or suppressed weapons because, not only is that unrealistic, it's a bit stupid (what's the point of suppressing a weapon if you're going to give a visual indication of where you are?)

It also means that tracer color is determined soley by side... So if a civ picks up an M16, it will have green tracers even if it was firing red ones a minute ago.

My (temporary) solution was this. You're welcome to use it if you want.

Quote[/b] ]

;EECP_Tracer_Init.sqs

;07/05/05

_u = _this select 0

EECP_MachineGunners = ["SoldierWMG", "SoldierEMG", "SoldierGMG"];

EECP_SpecOps = ["SoldierWSniper", "SoldierWLAWSniper", "SoldierWSaboteur", "SoldierWSaboteurPipe", "SoldierWSaboteurDay", "SoldierWSaboteurPipeHG", "SoldierWSaboteurLaser", "SoldierESniper", "SoldierESaboteurPipe", "SoldierESaboteurBizon", "SoldierESaboteurPipeHG", "Hunter", "SoldierGSniper"];

~1

? typeOf _u in EECP_SpecOps : exit;

? typeOf _u in EECP_MachineGunners : goTo "MG"

[_u, 3]call loadFile {\bn_tracer\addTracerUnit.sqf};

exit;

#MG

[_u, 5]call loadFile {\bn_tracer\addTracerUnit.sqf};

exit;

Exec that as the Man class init EH. Nobody that shouldn't be firing tracers fires them, and rifles and MGs have different ratios of them.

Share this post


Link to post
Share on other sites

Thank you mate smile_o.gif

But I've used a different way to fix that though , I just added a new class eventhandlers to the units which aren't expected to have weapons using tracers like "soldierwsaboteur" or "soldieresaboteur" -> (in FFUR it has a silenced akm wink_o.gif ) without to add the script of tracers and it perfectly works smile_o.gif

Regards

TB84

Share this post


Link to post
Share on other sites

I have been using this addon combined with the Y2K3 mod for age's,no problem.However when i downloaded the new revolt campaign which required the latest version(124) which i downloaded and installed to my Y2K3 folder(and overwrote my old version) i can play the revolt campaign no problem,but whenever i play any other single mission's or campaign's which previously gave me no problems i get a "cannot load mission- missing addons-BN-trcers 123" if i click OK i can still play the mission's and campaign's and still get the tracer's.It's a small problem but does anyone know (1) what the problem is,and (2)how do i get rid of it? Thank's in advance inlove.gif

Share this post


Link to post
Share on other sites

edit the Y2K3 config to have the addon name the error gives you. at the bottom class preload addons.

ill fix that for 7.3

Share this post


Link to post
Share on other sites

Yes, very nice addon indeed, but is there a way to increase the brightness on the tracers? Like adding some lighting affect?

Share this post


Link to post
Share on other sites

Hello,

there is no real easy way to add brightness/lighting to the tracers. Actually it can be done to some extent, however it will lag you to bits as the number of light sources will just become excessive during battles.

Regards

Share this post


Link to post
Share on other sites

bummer, oh well, it rocks anyways!

Share this post


Link to post
Share on other sites

I'm one of those Ofp users who search for maximum realism an sort of miss real looking tracers i the new ECP .85. I'm also a total newbie to scripting and config. modding...

Could there be a "walkthrough" regarding adding these tracers to a config. to be used with all missions and campaigns? Tried FFUR a while ago and really liked the tracers... confused_o.gif Would love to ad them to ECP...

mvh

Abbe

Share this post


Link to post
Share on other sites

I have a problem. I became error message ingame:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

´while{_i2!=_i+1}do{ _u removeEventHandler["getin",_i2]; _u removeEventhandler["getin",_i]; _i=_u addEventhandler["getin",{}]; _i.....

Can anybody tell me why i can have this message ?

Share this post


Link to post
Share on other sites

That is the event handler index determination and embedding script. It basically determines the index of the event handler, before it adds it. It would seem that for some reason, which is unknown to me, it tries to do this 10,000 times and still fails to embedd the proper eventhandler index.

Are you sure you aren't running the tracers manually in a mission and also as part of a mod that has the tracers built in?

Share this post


Link to post
Share on other sites

That looks like the error VTE gets when the soldiers init eventhandler runs the tracer script, but at mission start the soldiers mission-editor-init-line says deleteVehicle this;

Does that cause any harm, lets say some mission has many of these deletevehicle guys at mission start (like the unscripted war for example, I guess the whole 64 heh)?

Share this post


Link to post
Share on other sites

Quite possibly. Very bad idea to be adding tracers to a unit you delete in it's own init field. smile_o.gif

Share this post


Link to post
Share on other sites
Quote[/b] ]I have a problem. I became error message ingame:

Code Sample

´while{_i2!=_i+1}do{ _u removeEventHandler["getin",_i2]; _u removeEventhandler["getin",_i]; _i=_u addEventhandler["getin",{}]; _i.....

Can anybody tell me why i can have this message ?

I get this too. Only seems to happen in multiplayer missions. I have the tracers load within my config (so all units have them, not through scripting).

bn880 I don't quite follow what your saying. Is there a workaround? Doesn't seem to have any negative impact other than a couple seconds of lag. I thought maybe the variables were being used somewhere else so I changed all the variable names to make sure they weren't conflicting. Didn't work though. So I'm kind of at a loss too.

Share this post


Link to post
Share on other sites

I get the same message when I try to implement the tracers with a config mod. So I am also very interested about a workaround. smile_o.gif

Share this post


Link to post
Share on other sites

Heh, yet I have never seen this message in all the MP missions I've played, and the WGLZ mod (that's right WGL Zeus version) implementation of the tracers.

I guess a rundown howto really is needed...... though I don't have the time to make one at present.

Share this post


Link to post
Share on other sites
Quote[/b] ]I have a problem. I became error message ingame:

Code Sample

´while{_i2!=_i+1}do{ _u removeEventHandler["getin",_i2]; _u removeEventhandler["getin",_i]; _i=_u addEventhandler["getin",{}]; _i.....

Can anybody tell me why i can have this message ?

I get this too. Only seems to happen in multiplayer missions. I have the tracers load within my config (so all units have them, not through scripting).

bn880 I don't quite follow what your saying. Is there a workaround? Doesn't seem to have any negative impact other than a couple seconds of lag. I thought maybe the variables were being used somewhere else so I changed all the variable names to make sure they weren't conflicting. Didn't work though. So I'm kind of at a loss too.

No workaround, a good implementation of the tracers would do the trick though. I have no clue how you are all pulling this off besides somehow deleting the objects on init as Snake suggested...

Share this post


Link to post
Share on other sites

Indeed the missions I am working on use the deletevehicle this in the init line, thats why the error message occured in the config mod I was using.

So would delaying the erasing of the units work? I mean to let the tracers initialize themselves and delete the units afterwards. Did you test the tracers with missions where spawining and deletion of the units could occur during a short intervall.

Share this post


Link to post
Share on other sites
Indeed the missions I am working on use the deletevehicle this in the init line, thats why the error message occured in the config mod I was using.

So would delaying the erasing of the units work? I mean to let the tracers initialize themselves and delete the units afterwards. Did you test the tracers with missions where spawining and deletion of the units could occur during a short intervall.

Well, I use the tracers constantly with AIOD which is a "spawning" script. To get the tracers to load on a spawned unit takes some doing. It's not a matter of whether this was tested, it's a matter of ensuring this unit is actually processed correctly and in the exact order on all network clients.

Now, if you are deleting the men on init, don't add tracers to them, if you later spawn them they won't have tracers anyway unless you properly hack the AIOD code. If you delay their deletion even by 0.1s the problem should go away, however a 3.5s wait would be best.

Share this post


Link to post
Share on other sites
Quote[/b] ]Now, if you are deleting the men on init, don't add tracers to them, if you later spawn them they won't have tracers anyway unless you properly hack the AIOD code.

The tracers are added to the to be deleted units by the config mod I am using, so I will have to delay the deletion of the units in my missions, to make sure I will use the suggested 3.5 seconds. smile_o.gif

Share this post


Link to post
Share on other sites

Okay good luck, this is all complicated as units don't get their weapon loadouts immediately in a mission, you have to wait for a while.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×