Home   Help Search Login Register  

Author Topic: Anything dead?  (Read 631 times)

0 Members and 1 Guest are viewing this topic.

shadow99

  • Guest
Anything dead?
« on: 24 Oct 2004, 04:31:04 »
Hello. Is there anyway I can put in the condition field of a trigger 'not alive <anything>'?

I just want the mission to end at the start if the player decides to be stupid and open fire on his/her group.

There's also a small chance that an APC might run over one of the guys by accident, in which case, I would want the mission to end then, as well. How do I do this?

Offline Blanco

  • Former Staff
  • ****
Re:Anything dead?
« Reply #1 on: 24 Oct 2004, 05:21:38 »
Quote
I just want the mission to end at the start if the player decides to be stupid and open fire on his/her group

Run an eventhandler "killed" script on every friendly unit en check who's the killer. If the player is the killer , end the mission.



Search or search or search before you ask.

shadow99

  • Guest
Re:Anything dead?
« Reply #2 on: 24 Oct 2004, 06:25:43 »
I was afraid someone would answer like that. If by ANY chance ANY of the Westies die, I need the mission to end. Thanks for the solution, but it's not quite what I'm looking for. Anyway I can alter it, though?

GI-YO

  • Guest
Re:Anything dead?
« Reply #3 on: 24 Oct 2004, 11:52:13 »
This might work but i'm not to knowlagble on this subject, if you try this

" (canmove _x) and (canfire _x)" count [ westman1 ] == 0 "

in one trigger and then do as many triggers as you need for west me. e.g

" (canmove _x) and (canfire _x)" count [ westman2 ] == 0

" (canmove _x) and (canfire _x)" count [ westman3 ] == 0

and then set these triggers to end1 or loose. Just an idea. might take a while putting in all the triggers depends if you have alot of west men.

GI-YO

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Anything dead?
« Reply #4 on: 24 Oct 2004, 13:19:13 »
canMove and canFire are ideal for using on vehicles, but for soldiers you can use not alive.    However, GI-YO is right that in this case what you really need is a count command.

Trigger:-

Type:   End#3
Condition:   count units grp1 < 8

If the number of loons in the group drops below 8 (or whatever number there is supposed to be) then the trigger will fire and the mission will end.    To stop the trigger from firing later in the mission, deleteVehicle it.
Plenty of reviewed ArmA missions for you to play

shadow99

  • Guest
Re:Anything dead?
« Reply #5 on: 25 Oct 2004, 03:21:52 »
Well, I tried out the trigger method you suggested, Macguba, and then  I killed two of my team mates. I have 8 team members and the trigger didn't activate...

Offline Blanco

  • Former Staff
  • ****
Re:Anything dead?
« Reply #6 on: 25 Oct 2004, 04:41:49 »
It takes some time (sometimes a minute or 2)  before the game realise there is one unit less, especially in missions with lots of action or scripts.
Also I think that code will only activate when the leader knows someone's dead.

Maybe try this,

Code: [Select]
"alive _x" count units grp1 < 8

« Last Edit: 25 Oct 2004, 04:47:50 by Blanco »
Search or search or search before you ask.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Anything dead?
« Reply #7 on: 25 Oct 2004, 12:36:20 »
Yes, Blanco's right, I forgot about that.
Plenty of reviewed ArmA missions for you to play

shadow99

  • Guest
Re:Anything dead?
« Reply #8 on: 26 Oct 2004, 05:59:47 »
Well, I've decided I can fit it into the mission...

IF I can run a condition for a trigger where it checks if groups (groups, not units) are in their designated APCs. Remember, this means some of those group members may already be dead.

Oh, and make that a question, please.  :)

shadow99

  • Guest
Re:Anything dead?
« Reply #9 on: 29 Oct 2004, 05:06:25 »
Bump.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Anything dead?
« Reply #10 on: 29 Oct 2004, 12:36:23 »
Condition:   "alive _x" count units grp1 == "_x in apc1" count units grp1

Alternatively, you might want a

vehicle _x != _x

condition.
Plenty of reviewed ArmA missions for you to play