Home   Help Search Login Register  

Author Topic: alive script  (Read 979 times)

0 Members and 1 Guest are viewing this topic.

memo

  • Guest
alive script
« on: 09 Mar 2005, 22:00:55 »
Hello all
I have this in a script and i want to see the result in the game

("Alive _x" count units groupname) == 5

Sorry for my poor english !!

And

Thanks for all the great job out there.
Memo

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:alive script
« Reply #1 on: 09 Mar 2005, 22:23:10 »
Do you mean you want

hint format ["Number in group is %1", ({alive _x} count units grpName)]

Syntax not guaranteed.
Plenty of reviewed ArmA missions for you to play

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:alive script
« Reply #2 on: 09 Mar 2005, 22:24:27 »
I am not sure what you mean by seeing the results in the game.  What you have is a boolean expression that will be either true or false depending on whether or not the group has 5 living members.   To display the result in the mission your could do something like:

player sidechat format["%1",("Alive _x" count units groupname) == 5]
or

hint format["%1",("Alive _x" count units groupname) == 5]

memo

  • Guest
Re:alive script
« Reply #3 on: 10 Mar 2005, 13:14:26 »
ThankÂ's for the help
Sorry for my bad explanation

What i mean is,
i want to call a script with Radio alpha thats tell me how many men still alive in a group of 8 men


the result of this i want to see in the game, like a hint or plain text.
Ex.
CALL :Radio Alpha: Status group 1
Answer: 1,2,3,4....men alive (or dead)

Thanks
Memo  :-[

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:alive script
« Reply #4 on: 10 Mar 2005, 14:17:02 »
In that case macguba's code is what you want, just put it in the activation field of your radio trigger

memo

  • Guest
Re:alive script
« Reply #5 on: 11 Mar 2005, 10:49:13 »
Hi

sorry mates, i dont get it

I have a script that i want to call alive.sqs in the activation field on a radio alpha trigger.
"[this] exec "alive.sqs"
In the script should i write the macguba's code
"hint format ["Number in group is %1", ({alive _x} count units grpName)]"

I have two groups that i call pl1 and pl2 and i replace grpName with pl1 or pl2 ?


Best reg.
Memo  ???, :-[

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:alive script
« Reply #6 on: 11 Mar 2005, 11:38:47 »
Yes, change grpName for the name of the group you want.

There is a tutorial on "this" in the Editors Depot.    You don't need a script, just put the code in the On Activation field of the trigger.

Look up all the commands in the comref and get to understand them.   Copying and pasting from forum posts without understanding what you are doing usually ends in tears.
Plenty of reviewed ArmA missions for you to play