Home   Help Search Login Register  

Author Topic: Find my old OFP script and convert to Arma  (Read 2697 times)

0 Members and 1 Guest are viewing this topic.

Offline Kendo J

  • Members
  • *
  • Britain Has more varieties of cheese than France
Find my old OFP script and convert to Arma
« on: 06 Sep 2012, 23:52:58 »
I wrote a script years ago for OFP. it gave casualty reports from the mission, usually an open ended/dynamic stlye mission. i had eventhandlers and a delete script in there and even had it so that all spawned troops got counted on their deaths so the death counts could be massive.

This is the link to the post of the original script...
http://www.ofpec.com/forum/index.php?topic=32417.0

HOWEVER, the download link doesnt work, it downloads but the content seems to be corrupted... any one have this or know how to recreate it using my description?

regards
ken

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Find my old OFP script and convert to Arma
« Reply #1 on: 14 Sep 2012, 15:10:04 »
Sorry pal, our previous site crashes have really come back to bite us in areas like this and we sincerely apologize for the inconvenience.

What you're asking seems pretty straight forward and quite simple, really. Firstly, the engine already generates a kill count in the debrief. If you would like to generate a kill count while playing the mission, it will depend on whether you would like to have it displayed in hint format, plain down format, or in a neat little customized dialog. The simplest being hint format since it doesn't intrude on gameplay as much as plain down would. The custom dialog would be preferred by most players as it provides a consistent display of changing numbers, depending of course on your own code.

Deleting dead units is quite basic when using eventhandlers. You simply run a simple delete script for every unit that executes the handler. You could even insert a modest loop with a player distance check to prevent bodies from being deleted in front of the player and ruining the immersion. In addition to deletion code, you can implement checks which check for unit type, side type, rank type, and even skill level to award points based on unit difficulty. To manage those numbers, you will have to employ global variables that you update with each script call. You can then pass that information to the screen by using the format command, in whatever display you have chosen.

Hope that refreshes your mind some as well as helpful.

Offline Kendo J

  • Members
  • *
  • Britain Has more varieties of cheese than France
Re: Find my old OFP script and convert to Arma
« Reply #2 on: 15 Sep 2012, 01:07:14 »
I could probably recreate this script just that my scripting skills have not been used for 4 years and so I have forgotten alot.

What my script did was give kill counts for every unit combined. By using the eventhandler 'killed' and a global count of +1 for each unit. Every unit (including spawned units) had something like

this AddEventHandler [{killed}, {west_casualties = west_casualties + 1}]

I dunno if that is the right syntax

Also in the INIT there was a line saying
West_casualties = 0
West_ARMcasualties = 0
East_casualties = 0
EAST_ARMcasualties = 0
& air units ETC...

So it will show all the deaths from the whole mission because firefights are going on irregardless of the players interaction

I then need a script that will call a hintC or Hint at base so you can see how the conflict is progressing.
The only problem is I cant remember how I wrote the script that gives you the figures from West_casualties = 0 to the count after a few people have been killed.


Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Find my old OFP script and convert to Arma
« Reply #3 on: 17 Sep 2012, 05:53:07 »
You didn't happen to place it in a mission did you?

Offline Kendo J

  • Members
  • *
  • Britain Has more varieties of cheese than France
Re: Find my old OFP script and convert to Arma
« Reply #4 on: 17 Sep 2012, 14:20:44 »
Unfortunately not one that I submitted. Only the example mission I gave with the script download. I used to post my script downloads here. I had a few buddies that placed my scripts and missions on independent download sites. but i dont think this one was.

However, it was downloaded over 200 times... maybe a few of those were after the link was broken, but enough that MAYBE someone has a copy!

It was super simple but had a little math and script syntax in it I just cant remember!!!