Home   Help Search Login Register  

Author Topic: which squad to talk  (Read 829 times)

0 Members and 1 Guest are viewing this topic.

Offline 456820

  • Contributing Member
  • **
which squad to talk
« on: 02 Jan 2006, 10:55:34 »
Alright i have a mission where i have a beach attack by 6 Ai west squads whilst the player is with Bravo squad overlooking a town waiting for the beach assault
The beach assault all goes to plan except theres a trigger at the top near the town when west set foot in the trigger it calls a scripts where im going to have some radio sounds play but im not sure how to check which squad to use out of the six squads who could possibly set that trigger off

How do i check which of the six squads named (grpecho1, grpecho2 all the way to grpecho6)
How do i check which of those squads entered the trigger so they can say the radio message instead of some squad who could be dead or at the bottom of the beach

Cheers

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:which squad to talk
« Reply #1 on: 02 Jan 2006, 11:09:47 »
This should give you a start.  Happy to help more if you need it.

if (leader grpecho1 in thislist) then {the leader of the first group is in the trigger}

If you don't need the leader to be in the trigger area then do something like:

if ({_x in units grpecho1} count thislist > 0) then {a member of group1 is in the trigger area}
« Last Edit: 02 Jan 2006, 11:12:43 by THobson »

Offline 456820

  • Contributing Member
  • **
Re:which squad to talk
« Reply #2 on: 02 Jan 2006, 14:05:42 »
mmm... that might not work since another squad could walk in the trigger once its activated and then that command will trigger twice ill have a go with it though see if it will work alright

Offline ryankaplan

  • Members
  • *
  • yeah...
Re:which squad to talk
« Reply #3 on: 02 Jan 2006, 21:33:18 »
this might be more simpler than what you are looking for but try putting down 6 different triggers, all for one individual group. To make triggers for a group:
1)create trigger
2)press F2 (or click on groups), and drag a line from the trigger to the group. (group the trigger with the leader of the squad basicly)
3)double click on the trigger you just grouped, and where it should normally  say 'west, east, resistance, civilian, all, none' there should be the options of 'vehicle, whole group, group leader, anyone from the group'. Select anyone from the group from that list.
4)Repeat six times for each trigger (a trigger per squad).

if you want only one of the triggers to trigger and the rest not to, then for each one:
1)in the 'on activation' field put : trigdone = true
2)in the 'condition' field put : this and not(trigdone)

make sure you also create a trigger which executes right at the mission start and defines trigdone = false

hope it helps, 'syntaxes not guarenteed' as some say
« Last Edit: 02 Jan 2006, 21:34:22 by ryankaplan »

Offline 456820

  • Contributing Member
  • **
Re:which squad to talk
« Reply #4 on: 07 Jan 2006, 22:56:00 »
ahh great dont believe i never thought of that, that will work fine
thanks topic solved