OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Hunted on 23 Oct 2002, 03:20:28

Title: I dare ya...
Post by: Hunted on 23 Oct 2002, 03:20:28
Hello all,

Sorry for that silly 'subject.' Had to get your attention.  ;D

I am in desperate need of some advanced scripting from gifted person/s.


I need some kind of script to allow for the 'percentage' including the kills achieved after the game.

End of Mission
Player       Kills        Accuracy      Killed     Total
Hunted       2               60            0          60

The main purpose of this is to get the individuals 'accuracy' level.
I do realize that this is pushing the envelope abit but is there any other alternative method of getting the results?

I would greatly appreciate any help  :-\

Thanks in advance.

Hunted

email: hunted_GT@hotmail.com




Title: Re:I dare ya...
Post by: Ottie on 23 Oct 2002, 09:49:52
With the new patch out it is possible to add event handlers, with this it is possible to keep track of which unit is killed and by whom. I know there are some scripts that count how much ammo u used so 1 and 1 is three, mix the scripts and you have what you want. succes
Title: Re:I dare ya...
Post by: Hunted on 23 Oct 2002, 23:27:33
Thanks Ottie,

But Could you tell me where to find that particular script?
I can't seem to find it, despite looking at all the forums...just realized how long it took for me to read them all  :o

FYI- 'Event Handler' <--now that I know what that is called. :)

Hunted
Title: Re:I dare ya...
Post by: Ottie on 24 Oct 2002, 10:45:17
I found the scripts in my old database, its not my script but I know it works.

Title: Re:I dare ya...
Post by: Hunted on 01 Nov 2002, 18:13:09
Ok guys, thanks for helping me guiding to the right direction but...

The "Ammo count" is actually something similar but not quite the right one I am looking for.

Basically what I would like to see is a script that shows the ratio/percentage of the players shooting.  i.e. 25%,32%,~90% etc

Any other great ideas? thanks in advance.

Hunted
Title: Re:I dare ya...
Post by: CareyBear on 01 Nov 2002, 23:03:23
The only thing I can suggest is to keep a count of ammo used, which you could do by modifying the ammocount script above. You would have to allow for picking up more ammo, changing half-empty magazines and dropping magazines as well as changing weapons (with an immediate change in ammo amount). It is a very challenging scripting proposition you have there..  (sound fun yet?)

Then, add a 'hit' eventhander to each person. You'd have to play with this a bit, I don't know whether it passes the shooter - I think it does. So just increment a value for each player.

So, with those modifications to ammocount, you now have a script that counts shots fired and a script that counts hits, and again, 1 + 1 = 3.

There is also a script somewhere in the ed depot which was pre-event handler and could keep track of who killed who, but I don't know how it did it as I never examined it.

I have never seen a script that will achieve exactly what you want.

Try the Browse Snippets and use the Search feature.

Cheers,

CareyBear