Home   Help Search Login Register  

Author Topic: Roll Call of the Dead  (Read 1531 times)

0 Members and 1 Guest are viewing this topic.

Rjinswand

  • Guest
Roll Call of the Dead
« on: 15 Jul 2005, 05:12:08 »
Not actually entirely sure which heading of the forum this would go under...

I happened to be reading over the ancient script ( Everon Campaign ) by  Questionable Integrity & A Happy Sheep. Now everything seems to be fine, so i moderate while two of my mates fight it out over the beaches of Everon.

For those who are familiar with what i'm talking about, daydream for a couple of lines while i explain to those who aren't. The concept of the Everon Campaign is to produce a battlefield situation feeling by incorporating some long term strategy, roleplaying and most importantly, Operation Flashpoint.

Now ok, picture it. The Russians finally march over the debris and many resistance corpses. As you look around you wonder how many friends you lost this overcast day...

Then you hit the problem, JUST how many men did you loose? and if you allow things like morale to exist, JUST how many resistance men fled the scene (i know with setfleeing i could make them stand till the death, but it just don't seem realistic).

Short of manually marching up and down the lines, examining and counting how many men you have get left for the next assault, there's no way to do so. (to my knowledge).

I've worked on some underground projects that gained a small following for a while (most popular being the Skye Virus) for Sh3ll Sh0ck's W0rksh0p, so i have a better than average grasp on coding and things.

Basically i need these things:

~ A list of survivors of all sides
~ OR a list of how many lost, and from which squads (although with a bit of work, needing to know which squads could be make irrelevant)

Any ideas how Questionable Integrity & A Happy Sheep pulled it off? and if not, how can i work around it?

Cheers

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Roll Call of the Dead
« Reply #1 on: 15 Jul 2005, 08:02:09 »
Have a trigger for each side involved that covers the map.  Each is an: east or west or resistance or civilian present trigger.  

In your init.sqs or some other script that is executed early create an array of the living loons on each side as follows:Actually putting it in init.sqs is not good.  The code is likely to run before the trigger has created its array.  Run the code below a few seconds after the start of the mission.

Res_loons = []
{{if (alive _x) then {Res_loons = Res_loons + [_x]}} forEach crew _x} forEach (list trig_AllRes)

Note that trig_AllRes should be the name of the Resistance present trigger that covers the whole map.  Note also that this approach will give an array of all the living loons (in other words loons in vehicles will be represented individually.)

then:
deleteVehicle  trigAllRes

to remove the trigger you no longer need.

from then on:

{alive _x} count Res_loons

will give you the number of Resistance loons still alive.

Edit:

Looking again at the title of the thread be aware that the name command will not work for units that have been dead for more than a few seconds, so if you really do want a roll call you need to capture their names in a global variable first.

Edit, Edit:
Does your handle have anything to do with three elephants, a giant turtle and a wooden box?
« Last Edit: 16 Jul 2005, 12:53:43 by THobson »

Rjinswand

  • Guest
Re:Roll Call of the Dead
« Reply #2 on: 16 Jul 2005, 04:02:10 »
Well my handle is to with a certain amounts of elephants and a wooden box, and certainly a giant turtle. What a perceptive being you are!

You've lost my with the looms thing, what is a loom? Since i've been outta the editing community for too long, i guess i've missed some things...

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Roll Call of the Dead
« Reply #3 on: 16 Jul 2005, 06:39:33 »
loons is shorthand for men/women.  The word units doesn't do it because a vehicle full of loons can be a single unit.  Basically a loon is something with 2 legs.  A unit can have two legs, or wheels or tracks or a rotor or wings.

This all entiry personal, not everyone calls them  loons, I like the word because it is shorter and less melodramatic than soldeirs or men.

Perceptive?  Well I have ben sensitised recently by spotting a similar reference is someone's signature.

Mark

  • Guest
Re: Roll Call of the Dead
« Reply #4 on: 28 May 2006, 00:40:50 »
yeah! I ran across the same problems, and when i tried to implement that code, through a groupChat

p groupchat format ["%1", westCount]

where :

westCount = {alive _x} count west_loons

as per the previous bits 'o' code. ('cept everything is wested instead of resistance)

However, what i get out is not what i want, its some random garbage with Hex code included. Funnilly enough, if i just kill one person, it reverts to 0, even if there are more than 0 left.

Any clues what's up?

Mark

  • Guest
Re: Roll Call of the Dead
« Reply #5 on: 14 Jun 2006, 20:59:14 »
bump

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Roll Call of the Dead
« Reply #6 on: 14 Jun 2006, 23:42:57 »
grind.

see attached missionette.

[attachment deleted by admin]

Mark

  • Guest
Re: Roll Call of the Dead
« Reply #7 on: 17 Jun 2006, 10:00:34 »
My Thanks