Jump to content
Sign in to follow this  
ThePredator

Realistic Tracers

Recommended Posts

I get this error message when i try to add the command line to each soldiers initialization line i have the tracer addon in my ArmA addon folder can anyone tell me what i am doing wrong plz?

arma2007-05-3015-49-44-40.jpg

Share this post


Link to post
Share on other sites

Thats because you are missing 'this' before the init line

this exec "\cent_tracer\cent_tracer.sqs";

Share this post


Link to post
Share on other sites
The init-line method can be a problem in case that the gamelogic activates later than the unit you are trying to add to it, try the legacy method in this case.

Thanks, it is working for sure.

Share this post


Link to post
Share on other sites

I am a idiot ty mate, btw can you use these tracers online or are they offline only?

Share this post


Link to post
Share on other sites

I just looked at BN880's tracers, he modeled his own.

I'm asking him for permission to use (abuse tounge2.gif) them, so at the very least we have a choice of Tracers.

Simba; Thanks for taking a look at it, looking forward in hearing from you smile_o.gif

About the vector etc... "Too fast" etc. etc. I'm checking it.

Share this post


Link to post
Share on other sites

They are only online if the mission you are playing also uses these tracers. But apart from that there offline.

Share this post


Link to post
Share on other sites

Hi guys, was using the cents original addon pbo,with the init line in a trigger to make all troops fire the tracers and worked a treat!

Now im propably missing something here,btw read sickboys read-me but ,just got confused? smile_o.gif

Now using sickboys updated version by using the game logic method! and all still works fine!

Just wanted to know if theres any way to adjust the tracer round frequency using the Game Logic method?

Thanks

ck

Share this post


Link to post
Share on other sites
I just looked at BN880's tracers, he modeled his own.

I'm asking him for permission to use (abuse tounge2.gif) them, so at the very least we have a choice of Tracers.

Simba; Thanks for taking a look at it, looking forward in hearing from you smile_o.gif

About the vector etc... "Too fast" etc. etc. I'm checking it.

That sounds really awesome, I've missed those.

Share this post


Link to post
Share on other sites

Use the Init Game Logic and place a trigger with

{d=[_x, 3, 1, 1, 1] spawn CENT_tracer} forEach thislist

trigger must include every unit you want to have tracers, activated by anybody.

Share this post


Link to post
Share on other sites

Just tested ! thats excellent thanks Predator!

I'm assuming first number is per round,last is size of tracer?

Share this post


Link to post
Share on other sites

Always do matey! smile_o.gif

Just that one spun me out abit! wink_o.gif

Not enough cider me thinks! wink_o.gif

Share this post


Link to post
Share on other sites

Got the permission to do anything we want with the BN880 tracers biggrin_o.gif

Not sure if the models will work in ArmA before converted, will check soon.

Last night been toying around with the particle stuff, still don't get the hang of it but it's been only a couple of minutes. If anyone knows how to create tracer-alike effects with the setParticleParams function etc; please let me know smile_o.gif

Share this post


Link to post
Share on other sites

setting the _drag value to 1 gives good results for light weapons.

for the tail it's gonna be complicated, Bn880 defined his tracer model as a car, wish give him the possibility to set the right direction to tracer.

If you simply replace to model in the drop command, the particle direction will be random.

tacerpiccu1.jpg

using camcreate like Bn880 did would be a solution but size, color,... won't be handled as easily as before.

Share this post


Link to post
Share on other sites
setting the _drag value to 1 gives good results for light weapons.

for the tail it's gonna be complicated, Bn880 defined his tracer model as a car, wish give him the possibility to set the right direction to tracer.

If you simply replace to model in the drop command, the particle direction will be random.

using camcreate like Bn880 did would be a solution but size, color,... won't be handled as easily as before.

Thanks Simba!

So it seems we need to toy a little around with it.

Shouldn't we be able to attach the tracer to the projectile, looking at the setParticleParams: http://community.bistudio.com/wiki/setParticleParams

For the camcreate, the color isn't really the problem through setObjTexture etc, as bn did, but size indeed... we would need multiple model sizes in such case.

Share this post


Link to post
Share on other sites

you can modify the tracer size with the res lods,

but the best would be either to have a tracer that appears always in the same orientation or a tracer that can strech only in one good direction.

I think drop command is less laggy than camcreating the whole thing with it's axis, res lods...

don't know about the setparticleParams.

Share this post


Link to post
Share on other sites

Roger Simba. I can play a little around with particleParams etc. etc. but this will be in the coarse of upcoming weeks. If anyone in the meantime would wish to look around and supply better effects; I would be grateful.

Another subject;

As we can now read values from the config by scripting, we can add tracer properties to the respective ammo types.

Before I experiment with this to check for instance the performance, I would like to know what you guys think about the idea.

Basicly, it means that we would not have to work with arrays that define which Ammo should get what kind of tracer settings but instead we would insert these values directly into the ammo classes.

E.g:

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

{

tracerColor[] = {0, 0, 0, 0}; // Disable BIS Tracer Effects

tracerColorR[] = {0, 0, 0, 0}; // Disable BIS Tracer Effects

cent_tracerEnable=1; // 0 = false, 1=true;

cent_tracerColor[]={ {1,0.1,0.1,1}, {1,0,0,1}, {1,0,0,1} }; // Tracer Color settings

cent_tracerPer=3; // Amount of Bullets before tracer

cent_tracerSize=1; // Size of the tracer

};

We could then read the values:

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

_tracer=getNumber (configFile >> "CfgAmmo" >> _ammo >> "cent_tracerEnable"); // Will result in _tracer=0.67 if the class doesn't exist

if(_tracer==1)then

{

_tracerColor=getArray (configFile >> "CfgAmmo" >> _ammo >> "cent_tracerColor");

_tracerPer=getNumber (configFile >> "CfgAmmo" >> _ammo >> "cent_tracerPer");

_tracerSize=getNumber (configFile >> "CfgAmmo" >> _ammo >> "cent_tracerSize");

// Call the tracer effect

};etc. etc.

What do you guys think?

My own thoughts:

- True per-ammo setting without the need of having a load of different arrays

- No more need to run through the different arrays to determine IF and what kind of tracer

Considerations:

- Performance. If I use logic, I would say that reading a config value of an object that is already loaded ingame, is faster than checking multiple arrays for the ammo occurance. Must still be tested.

- Flexibility. The current setup is configurable from the Mission Maker, while a config setup would require editing on the Addon level.

Possible Optimizations:

- Only get the details once from the config, then create a variable: cent_ammotype as array that contains the data for this ammo. we can do a simple check with: if(isNil format["cent_%1",_ammo]) and fetch the data from the config if there is no such variable available. This can be done aswell in the current setup.

Share this post


Link to post
Share on other sites
DING DONG!

Colonel SandersLite and Mandoble are required on this thread tounge2.gif

Yep as soon as all tracers work as they should, we need a replacement.

Or maybe a beta before biggrin_o.gif

Share this post


Link to post
Share on other sites

ATM testing implementation of setVariable and getVariable on the unit objects to store and retrieve the tracer settings, which will cut out:

- 3 Arrays

- Many array operations (finding the position of unit in array, getting the details, saving details etc)

Aswell as a tryout with saving the settings of the ammo in a variable instead of looking it up everytime a bullet is fired.

I might post a beta version later for y'all to test the performance etc!

DING DONG!

Colonel SandersLite and Mandoble are required on this thread tounge2.gif

Yep as soon as all tracers work as they should, we need a replacement.

Or maybe a beta before biggrin_o.gif

Beta good idea sure. Tracers work fine for me though, what are you referring to?

If you mean the speed etc. of the Tracer, the changes needed will depend on what will be supplied to us.

If someone comes up with a drop, or particleParams or camCreate method; in all 3 cases we need a different approach.

As i've little time ATM, I as such would be happy with a proper new effect in any of the 3 methods, though as Simba states, the camCreate method requires a lot more and as such might not be as optimized as the drop or particleSource/Params methods.

Share this post


Link to post
Share on other sites

Have you guys tried adding a light source to the projectiles? I've been playing around with this and got some quite nice results. Here's my code:

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

_unit = _this select 0;

_ammo = _this select 4;

_bullet = nearestObject [_unit, _ammo];

if !(_bullet isKindOf "BulletCore") exitWith {};

_tracerColor = getArray (configFile >> "CfgAmmo" >> _ammo >> "tracerColor");

_light = "#lightpoint" createVehicleLocal (position _bullet);

_light setLightBrightness (_tracerColor select 3)/5;

_light setLightAmbient[(_tracerColor select 0), (_tracerColor select 1), (_tracerColor select 2)];

_light setLightColor[(_tracerColor select 0)/10, (_tracerColor select 1)/10, (_tracerColor select 2)/10];

_light lightAttachObject [_bullet, [0,0,0]];

waitUntil {!(alive _bullet)};

deleteVehicle _light;

It gives you a really cool effect when bullets fly close to buidlings and stuff because they actually glow.

Share this post


Link to post
Share on other sites

i mentioned Col.SandersLite and Mandoble just because they did some work on particles and stuff, no harm intended, i cant praise enough the work you guys are doing notworthy.gif

BTW: MadDogX, about the glow in the tracers, something i mentioned a few pages back and i feel it will be a very nice feature, were in the scripts do we copy\paste those lines?

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×