Home   Help Search Login Register  

Author Topic: [SOLVED] Detecting Group Strength  (Read 1771 times)

0 Members and 1 Guest are viewing this topic.

Offline snafu

  • Members
  • *
[SOLVED] Detecting Group Strength
« on: 18 Apr 2008, 16:25:40 »
Hey,

For my Search and Destroy mission (see Beta topic) I'm trying to implement some suggesstions. What I want is when the players group enters a trigger I want the groups strength to be detected and if it is say 6 and over a hidden objective would show up. However if the groups strength is lower than 6 the mission would end. Is this possible? If so how would I go about doing this?
« Last Edit: 18 May 2008, 15:19:31 by snafu »

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Detecting Group Strength
« Reply #1 on: 18 Apr 2008, 16:55:26 »
Create two triggers attached to the presence of the group.
In the condition of the first one:
Code: [Select]
this && (({alive _x} count units group player) > 5)In the onAct:
Code: [Select]
"2" objStatus "active"
For the other trigger:
In the condition:
Code: [Select]
this && (({alive _x} count units group player) < 6)And set it to End1 type.

Offline snafu

  • Members
  • *
Re: Detecting Group Strength
« Reply #2 on: 18 Apr 2008, 19:54:00 »
Thanks Mandoble! Looks like it's working fine.

Offline snafu

  • Members
  • *
Re: Detecting Group Strength
« Reply #3 on: 20 Apr 2008, 02:33:34 »
A problem seems to have surfaced regarding the two triggers and the waypoint of the players group it is synched with.

trigger 'ta2' - Triggers the hidden objective when group strength is 6 or greater.
trigger 't2' - Ends the mission when group strength is 5 and below.

I have tested the mission 4 times with ta2. 50% of the time the trigger fired, revealed the next objective and my AI leader would move the group to the neww objective. However the other 2 times the trigger fired (it updated the Briefing, played radio voice etc.) but the AI grop leader never moved to the new objective. One time he stayed at the original objective and the other time he circled a bunch of trees.  ???

I have ta2 set to fire when the OPFOR is not present and have it synched with the AI's 3rd waypoint which is within the trigger at the original objective.

I also have both triggers nearly on top of each other. ta2 is 78 by 78 so fits within t2 which is 80 by 80.
The waypoint both are synched with is just a move one.

I also have 'group1 = group this' in the init field of the players group leader (which names the whole lot group1 yes?) The group leader is also named 'sol1'.

I can also upload the mission file if I have not given enough detail.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Detecting Group Strength
« Reply #4 on: 20 Apr 2008, 03:46:21 »
I would say you did give too much detail. Always try to reduce the problem to the smallest test elements as possible, if you are able to reduce your problem or question to a very very short and accurate (to the point) paragraph or line, much better. Else it becomes a total mess. So far, what I've understood  :whistle:
- you have two triggers synced with a single waypoint, and they are exclusive, if one is accomplished, the other cannot be, or yes?
- You want any of them to "allow" the next waypoint or just one of them?

Offline snafu

  • Members
  • *
Re: Detecting Group Strength
« Reply #5 on: 20 Apr 2008, 04:28:09 »
- you have two triggers synced with a single waypoint, and they are exclusive, if one is accomplished, the other cannot be, or yes?
- You want any of them to "allow" the next waypoint or just one of them?



Yes two triggers are synced with a single point. Yes, if one is accomplished the other cannot be.
I just want one of them to allow the next waypoint.

So if the players group has less than 6 members in it 't2' will fire instead of 'ta2' and thus the mission will end.
But if the players group has 6 or more members then 'ta2' will be triggered and the hidden objective will become active.

Does that make sense?

Offline Sparticus76

  • Members
  • *
Re: Detecting Group Strength
« Reply #6 on: 20 Apr 2008, 07:17:49 »
How about a trigger that's syncronised to the units waypoint, and a logic moves inside the trigger area. The triggers condition is (Logic present) and (count units group > 6), on activation is to set the new objective. The logic then continues on to another Trigger that recounts the units in the group and if it's below or equal to 6 then it triggers end1.

Offline snafu

  • Members
  • *
Re: Detecting Group Strength
« Reply #7 on: 20 Apr 2008, 18:45:11 »
Sorry. I'm not sure what you mean exactly. Can you go into more detail or put up an example mission?


#EDIT: Don't quote the entire previous post you're replying to    h-
« Last Edit: 20 Apr 2008, 21:56:02 by h- »

Offline Rommel92

  • Members
  • *
Re: Detecting Group Strength
« Reply #8 on: 20 Apr 2008, 23:07:31 »
Why not just have one trigger that fires if the unit strength is < 6, then just have the waypoints continue on as normal, with the objective updates in a separate trigger with strength > 6.

Don't link the waypoints at ALL.