OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: snafu 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?
-
Create two triggers attached to the presence of the group.
In the condition of the first one:
this && (({alive _x} count units group player) > 5)In the onAct:
"2" objStatus "active"
For the other trigger:
In the condition:
this && (({alive _x} count units group player) < 6)And set it to End1 type.
-
Thanks Mandoble! Looks like it's working fine.
-
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.
-
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?
-
- 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?
-
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.
-
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-
-
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.