Home   Help Search Login Register  

Author Topic: unit joins player once found  (Read 940 times)

0 Members and 1 Guest are viewing this topic.

Offline ONoSixIsDown

  • Members
  • *
unit joins player once found
« on: 14 Nov 2005, 21:26:14 »
im curently making a mission where the player is tasked with rounding up lost units.  

what i want to happen is make the unit joint the player's group when the player gets within a certain distance relative to the unit.

is there a way for this to happen using the "on activation"
field of a trigger? or do i need to have the trigger run a script.

something tells me there is a simpler way but i cant figure it out....

thanks a bunch

[edited]: i want to be able to do this with out using
way-points so i can have the lost soldier's position be random
« Last Edit: 14 Nov 2005, 21:28:43 by OhNoSixIsDown »
CRIMSON REIGN COMMING..... eventually :/

Offline Baddo

  • Former Staff
  • ****
  • Reservist Jaeger
Re:unit joins player once found
« Reply #1 on: 14 Nov 2005, 21:36:29 »
To Condition field of trigger:

Code: [Select]
player distance lostGuy < 50
To On Activation field of the same trigger:

Code: [Select]
[lostGuy] join player
where lostGuy is the name you gave to the unit which must join the player's group when the player finds him.

Adjust the number 50 to whatever distance in meters you need.

Remember that you can have up to 12 members in your group. So make sure you have 'space' for all lost soldiers you want to join to your group.
« Last Edit: 14 Nov 2005, 21:38:26 by Baddo »

Offline ONoSixIsDown

  • Members
  • *
Re:unit joins player once found
« Reply #2 on: 14 Nov 2005, 21:38:47 »
great! thanks a bunch! thats alot simpler than i thought it would be ;D
« Last Edit: 14 Nov 2005, 21:42:07 by OhNoSixIsDown »
CRIMSON REIGN COMMING..... eventually :/

marcus3

  • Guest
Re:unit joins player once found
« Reply #3 on: 14 Nov 2005, 21:38:56 »
ugh i was typing this!
Make a trigger, put in the on Codtion field.
Player distance (lost guys name) < 3

that means when the player is less then 3 meters from the lost guy the trigger will "pop", now in the ONoactiveon field put
[(lost guys name)] join player

make sure you put the guys name with [] on both sides. now to make this a little more real you might put after the join thing.
(lost guys name) sidechat "I am sure glad to see you sir!"
etc.
hope this helps.  :)
« Last Edit: 14 Nov 2005, 21:40:36 by Big Boss Marcus »

Offline ONoSixIsDown

  • Members
  • *
Re:unit joins player once found
« Reply #4 on: 14 Nov 2005, 21:50:40 »
thanks for the extra insight, Big Boss.. however, i tried putting in the side chat.  I got an error message.  could you please explain what is needed for a sidechat message to go off?

the error i got was that 1 elements were expected and 2 were provided....
CRIMSON REIGN COMMING..... eventually :/

Offline Garcia

  • Members
  • *
  • Leeds United is the best football team...EVER!
Re:unit joins player once found
« Reply #5 on: 14 Nov 2005, 22:14:42 »
Code: [Select]
[lostGuy] join player; lostguy sidechat "I am sure glad to see you sir!"
that should work, if you put it in the on activation field...

Offline ONoSixIsDown

  • Members
  • *
Re:unit joins player once found
« Reply #6 on: 14 Nov 2005, 22:19:24 »
it does, thanks all
CRIMSON REIGN COMMING..... eventually :/