Home   Help Search Login Register  

Author Topic: report status via scripting?  (Read 814 times)

0 Members and 1 Guest are viewing this topic.

Offline Blanco

  • Former Staff
  • ****
report status via scripting?
« on: 16 Jun 2004, 18:54:22 »
Hi, In my mission I'm a commander of a Delta squad but my guys are not grouped at the start ( i have my reasons)

They have to hold Saint Phillipe on Everon until the extraction helicopter (helo1) arrives.
Once helo1 is near Saint Phillipe all my guys join (grp1) and I'm in command.
The enemy is not defeated during extraction, you have to fight your way to helo1.
A second helicopter (helo2) rappels another small squad (grp2), they will guard and cover the extraction zone.
Once grp2 is on the ground and in position, helo2 takes off and attacks the remaining enemy forces. (they keep coming via createunit)
When my group (grp1) is boarded, helo2 turns back and pick up grp2.
It all works now, but there still an enoying problem.

When my group (grp1) moves to the extraction zone, some of them got killed on the way, but they arestill  in my list on the bottom of my screen.
The OFPengine is not fast enough with updating the number of remaining soldiers. I always have to give them an order first (or wait a long time) before the OFPengine knows somebody's down's
The problem is that I have a waitscript running that checks how many soldiers are alive of grp1 to prevent a take-of of helo1. (you know the problem)
 
Is there a way to solve this?
"Report status" via scripting maybe?
Search or search or search before you ask.

Wallas

  • Guest
Re:report status via scripting?
« Reply #1 on: 17 Jun 2004, 12:43:03 »
The OFP engine IS fast enough, but the progammers wanted to make it real, so if you donÂ't know they are killed and they are really killed, you have them in list, because you donÂ't know it??
ArenÂ't you lost? I it is clear enough???  ;)

Offline Jezuro

  • Members
  • *
  • Hookah 4 lyfe!
    • Jezuro's ArmA Workshop
Re:report status via scripting?
« Reply #2 on: 17 Jun 2004, 12:43:49 »
If you're checking the group via "alive" command, then I see no problem. This command does not depend on the bar of your current units. This is only a graphical stuff. Your soldiers can be a part of your group even if they're dead (when you don't know they're dead), but it has no deal with "alive" command, as I said before  ;)
"We are Her salvation, and through Her command we shall live forever. I will not die. Not here. Not now. Never!!!"

ponq

  • Guest
Re:report status via scripting?
« Reply #3 on: 17 Jun 2004, 19:21:20 »
if the above doesn't work couldn't you do something like this:

Disband each soldier from the group
Check if each soldier is alive. If alive, rejoin into the group.
And make this loop once need with a ~1 sec pause, and end it once you enter the chopper?

Offline Jezuro

  • Members
  • *
  • Hookah 4 lyfe!
    • Jezuro's ArmA Workshop
Re:report status via scripting?
« Reply #4 on: 18 Jun 2004, 12:43:47 »
if the above doesn't work couldn't you do something like this:

Disband each soldier from the group
Check if each soldier is alive. If alive, rejoin into the group.
And make this loop once need with a ~1 sec pause, and end it once you enter the chopper?

I don't like this much  ??? Your suggestion will cause repeating radio message

"X FOLLOW 1"
"We are Her salvation, and through Her command we shall live forever. I will not die. Not here. Not now. Never!!!"

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:report status via scripting?
« Reply #5 on: 18 Jun 2004, 16:56:28 »
Hmm...

You could play with some of these:

give every unit in players group a "killed" eventHandler.
this addEventHandler ["killed",{[this] join grpNull}]
This is bad because the soldier gets out of players squad immediately he/she dies, before even hitting the ground...

Use triggers with countdown (1,3,2... or something like that), one trigger for each man in the squad.
Condition: !alive unitName
on Act.: [unitName] join grpNull

Or, write a script that has a delayed loop that checks the status of the men in the squad, and when someone is dead the scripts joins the dead man to grpNull...

Oh, and grpNull is a non-existent group...
"non-existing group. This values is not equal to anything, even to itself. false " - ComRef

These suggestions are a bit sucky though, as they don't report the KIA, he/she just vanishes from the squad... ::)
But I think this can be worked around somehow :P

And no guarantees on the syntaxes :P
« Last Edit: 18 Jun 2004, 17:02:41 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Blanco

  • Former Staff
  • ****
Re:report status via scripting?
« Reply #6 on: 18 Jun 2004, 18:13:42 »
@HateR_Kint

Sounds like a possible solution for the unitlist prob

But the main problem is that the script should know when a man in my group dies, not the leader of the group
I've noticed the chopper only leaves when I know every living soldier is in the chopper and when I know the script knows it too.

Damn, I wish I had the script with me right now...
I'll post it later.




 
« Last Edit: 18 Jun 2004, 18:13:55 by Blanco »
Search or search or search before you ask.

Wallas

  • Guest
Re:report status via scripting?
« Reply #7 on: 20 Jun 2004, 22:45:38 »
I think that controling via scripts and unjoining dead ones should help, or you want something more?

Offline Blanco

  • Former Staff
  • ****
Re:report status via scripting?
« Reply #8 on: 21 Jun 2004, 17:28:02 »
indeed, unjoining units when they got killed works great, but the casualties are not counted anymore in the statistics ,  because they are not a part of your group anymore (even with a delay b4 unjoining)
« Last Edit: 21 Jun 2004, 17:29:54 by Blanco »
Search or search or search before you ask.

Offline Jezuro

  • Members
  • *
  • Hookah 4 lyfe!
    • Jezuro's ArmA Workshop
Re:report status via scripting?
« Reply #9 on: 21 Jun 2004, 19:30:20 »
Well... You maybe know that if you order any member of your squad to "fall back into formation" and when he's actually dead already, the leader waits a while and when that unit doesn't answer ("Roger!"), he says "Oh no, ... is down...".

You can simulate the order by using

EnableRadio FALSE
DeadSoldier CommandFollow MyLeader
EnableRadio TRUE

The order won't be shown as a radio command, but whn the unit won't answer, the leader will report it's death. Could it help?
"We are Her salvation, and through Her command we shall live forever. I will not die. Not here. Not now. Never!!!"

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:report status via scripting?
« Reply #10 on: 21 Jun 2004, 21:41:24 »
indeed, unjoining units when they got killed works great, but the casualties are not counted anymore in the statistics ,  because they are not a part of your group anymore (even with a delay b4 unjoining)
Yeah, I kind of suspected that would happen... :(

Quote
EnableRadio FALSE
DeadSoldier CommandFollow MyLeader
EnableRadio TRUE
Hmm... May work...

Altough I think this would probably need some delays between the commands to work, so what if an nme happens to come by just when you are having enbaleRadio falsed...
Nobody would report the nme and it would probably cost some lives ;)

But this is worth a try...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline ACF

  • Members
  • *
  • Llama?? Ain't that French for tanks?
Re:report status via scripting?
« Reply #11 on: 22 Jun 2004, 13:17:38 »
Thinking laterally, why not just add a radio trigger or an action to release the chopper - then you, as leader, decide when to go?  Or, release it when YOU get aboard, maybe after a little delay (first man on the ground, last man off it - you've seen the film!)

Or, tweaking Jezuro's idea, if you are checking for units on board via a looped script, add a line like:

{_x DoFollow player} ForEach Units grp1

But don't allow it to happen while you're in contact. Or just run it once if you have a convenient event or action that can call it, like a WP before the chopper lands.  DoFollow should do the same as CommandFollow but silently, so the hope is it still reports status logically if not audibly.

Offline Blanco

  • Former Staff
  • ****
Re:report status via scripting?
« Reply #12 on: 22 Jun 2004, 19:50:44 »
Quote
Thinking laterally, why not just add a radio trigger or an action to release the chopper - then you, as leader, decide when to go

Yeah, I like that idea. (with addaction, with speech sound file) It sounds realistic too.
When you're a wimp commander you can just save your own ass and you recieve bad points in the final score.
Or when you are a warhero, you can fight and make sure that all wounded and crawling mates got in the chopper.
 
Thx, g8 idea.

Search or search or search before you ask.