Home   Help Search Login Register  

Author Topic: Joining squad  (Read 474 times)

0 Members and 1 Guest are viewing this topic.

hooahman

  • Guest
Joining squad
« on: 19 Aug 2003, 04:23:04 »
I am making a mission where you are scattered and have to find your buddies.  Sort of like I44 Drop Zone (1st mission of I44 demo campaign).  Is there a script which makes a soldier join your group whenever you are within a 5m radious of them?  I don't need any sounds, but whenever you get near the soldier a thing comes up in action menu saying Link-up or something similar.  If anyone knows of a script like this please post link!  Thanks in advance!

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Joining squad
« Reply #1 on: 19 Aug 2003, 10:54:57 »
Something like this... syntax not guaranteed, this is little more than a sketch.


#loop

?loon1 distance loon2 <5 :goto "activate"
~3
goto "loop"

#activate
[loon1] join loon2

or

loon1 addaction [ etc etc

exit
Plenty of reviewed ArmA missions for you to play

hooahman

  • Guest
Re:Joining squad
« Reply #2 on: 19 Aug 2003, 16:53:00 »
Red on the offical Forums actually got 2 scripts that do exactly what I want.  Here is the stuff.
Detect.sqs
Code: [Select]
_unit = _this select 0

#loop
~0.5
?(player distance _unit) > 5:goto "loop"
unitnearplayer = _unit
action1 = player addaction ["Link-up","link.sqs"]
exit
 


link.sqs
Code: [Select]
player removeAction action1
[unitnearplayer] join player
exit

These work, but have 2 problems.  
  • I can link up with my guys from the other side of island
  • It only works with 1 guy
I dont want to have a ton of scripts running to link the guys up, just 1.  Can you do this?  Thanks!
« Last Edit: 19 Aug 2003, 17:39:07 by hooahman »

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Joining squad
« Reply #3 on: 20 Aug 2003, 02:27:56 »
What do you need a script at all for??

Why not just add the action directly to the guy you want to player to be able to join up with? ;)