Home   Help Search Login Register  

Author Topic: RealTracer V.9b  (Read 9303 times)

0 Members and 1 Guest are viewing this topic.

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:RealTracer V.9b
« Reply #30 on: 17 Jun 2005, 21:17:17 »
aww >:(

when i put v. 94 in my user missions folder and started ofp, i get an error in the user info that says "error, < incountered insted of =" and ofp wont work, i took the mission out rebooted, still the same problem.

lucky me now i get to reinstal ofp and lose everything,

its my comps fault it just happend to be on your mission,

any sugjestions or somthing i can do so i dont have to restart? and lose everything


Offline Pilot

  • Contributing Member
  • **
Re:RealTracer V.9b
« Reply #31 on: 17 Jun 2005, 21:49:53 »
@penguinman

Have you installed any addons recently?  If so, remove them.  If not, I can only suggest two things:
1: Make a copy of everything you don't wan't to lose
2: Start a post on the Official Forums, that is the place for technical help.

I hope you can get your problem fixed!

-Student Pilot

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:RealTracer V.9b
« Reply #32 on: 17 Jun 2005, 22:40:28 »
nope, no recent addons, only the newest version of realtracer.

ok, i dont have an account on the oficial forums and it dosent look like the problem can be fixed, so il just save everything i dont want to lose and reinstal. good idea,

thanks SP/ :)

EDITok, i think its working now, ive had to reinstal, but what I want to know is will it happen again if i try to dl it?
« Last Edit: 18 Jun 2005, 01:12:58 by penguinman »

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:RealTracer V.9b
« Reply #33 on: 19 Jun 2005, 07:02:27 »
is the final almost done?

i like it alot so im waiting for this to be done so i can put it in my mission and be able to release it

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:RealTracer V.9b
« Reply #34 on: 02 Jul 2005, 23:45:37 »
Wow, these look great! Way better than the other tracer script that was linked to, and it doesn't require addons either!

I only get about 12-18 FPS, and sometimes I can't see the tracers very well/at all. I have this problem with other quick drop effects as well sometimes, but yours doesn't seem to be too bad. I wouldn't worry about trying to slow it down any for lower end computers.

You know, I was playing with these and I thought to myself: "damn, now I wish there was a way I could disable OFP's default tracers." Then I remembered you could do it in the options panel  :P. Now it looks even better! Too bad I can't disable MG tracers as well, because these are just better than the BIS stuff.

One thing I noticed, which I'm sure you are aware of, is that EVERYTHING gets a tracer, not just the primary weapon. Grenades, pistols, etc... they all have tracers. An easy fix might be to check if the fired weapon is the unit's "primaryWeapon" (see com ref for that command). I don't think this would solve m203's firing trace though. Another solution might be to just check the speed of the fired round, and if it is below a certain speed, then exit.

----------

Looking in the scripts, I see that you adjust the tracer depending on where the player is. Very nice :), just make sure to check distance to VEHICLE PLAYER, in case the player is in a car/helo/etc. One suggestion would be to put a Level Of Detail variable in there that says the maximum distance from the player that tracers will be shown. That's used in the ECP to cut down on needless effects that the player can't see.

I must admit, I'm confused about why you use the function and invisible H for the ricochets at the end. Are you aware that you can use the "drop" command without passing an object to it? Since you already know the last position of the bullet, I don't see why you need the H/function. ???

Now some performance issues. With a script like this, every little bit of lag counts bigtime, since it is run every time every unit shoots every round:

I notice that there are only 2 tracer colors supported. If that is the case, then you really only need 1 weapon array. Meaning, you only need to know if the fired weapon is in the "green" tracers array, otherwise you can just default to red tracers (or vice-versa). That way OFP only has to search thru one array, which hopefully would be the smaller of the two.

The "custom tracer mix" array also seems a little unneeded. You could just divide the unit's remaining rounds by 3, and if the result is an even number, then you use a tracer. The "mod" command would come in handy here. I'd have to think about the exact formula that would be required, but it would only involve a check like this:

? (_a % 3) == 0 : goto "loop"

That would be quicker for OFP to check than searching thru a huge array. I realize that this wouldn't support, say, having the last 5 rounds be all trace, but perhaps a combination of array and the above would work:

? (_a in [1,2,3,4,5]) || (_a % 3) == 0 : goto "loop"


In MP, I think this script should work just fine. I believe that EHs fire on all clients, which would mean that the drop effects would be created locally on each player's machine (which you need because drop effects can only be seen on the machine where they are created). The tracer size would adjust itself to each player properly. Ricochets would be different on each machine, since the random number is "rolled" up on each separate client, but since it is only visual, it isn't a problem.

The only thing I would add for MP is a check to see if this is a dedicated server. Since no one is playing on a ded server, there is no one to see the effects, so the server doesn't need to bother creating them. You also might get errors, since you use the distance to the player, which doesn't exist on the ded. server.

On ded. servers, the "player" variable is null. So a check at the very beginning of the script would work:

? player == player : goto "start"
exit
#start

HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Grendel

  • Guest
Re:RealTracer V.9b
« Reply #35 on: 06 Jul 2005, 17:41:32 »
Hey General Baron!

Thanks for the input! Thats good stuff, all of it!

The Invis "H" was needed as the bullet's 'last position' was usually 20m or so in front of the actual impact point (and thus in the air) so there would be this disconcerting 'jumping' of the tracers that just looked crappy.  I'm still working on it though...

The newest version I posted should solve some of the issues with tracing only defined weapons (although I haven't finished the M203 muzzle mode check yet), I think you were using an older version maybe?

I greatly appreciate your performance suggestions and of course the complimentary remarks  :)

-Grendel

BlinkDog

  • Guest
Re:RealTracer V.9b
« Reply #36 on: 07 Jul 2005, 00:34:38 »
Great little script. I decided to try it out today and came across a bug maybe. I kept getting a message "not a tracer weapon" I found it annoying because it spammed my sidechat. Was this intensional? If so can it be disengaged? I'm really new to scripting (like today) and would like to use this one in all my missions.

DBR_ONIX

  • Guest
Re:RealTracer V.9b
« Reply #37 on: 07 Jul 2005, 16:22:42 »
There will be a line similar to
someone sidechat/globalchat/groupchat (Not sure whichone) "Not a tracer weapon"

Either put a ; before it (Comments it, this way is better incase you want to eneable it to check if tracers should be enabled on a weapon), or delete the line (Works, but just as eay commenting it :P)
- Ben

BlinkDog

  • Guest
Re:RealTracer V.9b
« Reply #38 on: 07 Jul 2005, 20:52:37 »
Yes I did see a line like that but wasn't sure if it would screw up the rest of the script or not. I'll give that a try.

And yes tracers do fly over long distances after ricocheting. This script brings back memories of my gunners course.

Offline KeyCat

  • Members
  • *
Re:RealTracer V.9b
« Reply #39 on: 08 Jul 2005, 15:27:30 »
Damn, I nearly missed these cool tracers and that just shows I don't check in to this great forum often enough! Great work Grendel!

We are currently using Wolfbane's tracer script that uses a very similar approach like yours but yours up's the ante a few notches. Since our major concern is MP we will try it out ASAP but as GB said it probably works fine.

Only looked at it briefly and you don't use many global variables but on the few you have I suggest you to add an unique OFPEC tag just to avoid potential conflicts with other scripts/addons.

More info here http://www.ofpec.com/tags_about.php

Also maybe you could take a look at Wolbane's script to get ideas on how to solve the GL issue and maybe other things?? Let me know if you want it and I will e-mail it to you.

Will let you know how the MP tests go!

/Christer (a.k.a KeyCat)


« Last Edit: 08 Jul 2005, 16:07:04 by KeyCat »
- The journey is the reward!

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:RealTracer V.9b
« Reply #40 on: 29 Jul 2005, 17:06:02 »
so hows the next version comming?
 im just asking because i want to put the script in a mission im making.

Offline 456820

  • Contributing Member
  • **
Re:RealTracer V.9b
« Reply #41 on: 04 Sep 2005, 19:07:35 »
i cant get this to work in my mission i copy the trigger from the example missions and all the lines wich are needed from the nit to my init.sqs file
the script works great in the example mission but doesnt work in my mission ?

by the way nice tracers

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:RealTracer V.9b
« Reply #42 on: 06 Sep 2005, 22:19:35 »
How do I make custom weapons have the tracers? Is it a simple case of adding the weapon type to the scripts and if so, where?
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline 456820

  • Contributing Member
  • **
Re:RealTracer V.9b
« Reply #43 on: 06 Sep 2005, 23:02:00 »
i thought you could add the name of thw weapons to the lines in the init.sqs or is that the weapons that wont wofire tracers

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:RealTracer V.9b
« Reply #44 on: 07 Sep 2005, 19:14:36 »
lol, yeah, I took a look and it worked. It's now a part of my new mission.
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."