Home   Help Search Login Register  

Author Topic: Jumping from squad leader to squad leader  (Read 1423 times)

0 Members and 1 Guest are viewing this topic.

RedLion

  • Guest
Jumping from squad leader to squad leader
« on: 07 Sep 2002, 09:32:22 »
 ??? Hey Guys!
For the intention of controling more than one squad in a MP game, Is it possible for example, to have 5 squads or any # of squads, and jump from one squad leader to the next as if taking over the leader or becoming the leader yourself ?
Many thanks in advance for your help!

Regards,
RedLion

Backoff

  • Guest
Re:Jumping from squad leader to squad leader
« Reply #1 on: 09 Sep 2002, 21:11:23 »
Hey,

it would be possible using the join command:

[PlayersToJoin] join GroupToJoin

So, the following script will do the trick:

;-----------------------------------------------------------
;Switch group leader
;By Backoff

_player = _this select 0
_param = _this select 1
_GroupArray = [group1,group2,group3,group4]
?(_param > count _GroupArray): hint "param out of range";Exit

[_player] join grpNull
[Units (_GroupArray select _param)] join group _player
Exit
;-----------------------------------------------------------

How to call this script:
[PlayerID, GroupArray#] exec "switch.sqs"

Where PlayerID is the player you want to be the leader
GroupArray# is the position in the _GroupArray of the group you PlayerID to lead.

You have to modify the value of _GroupArray with the group names you defined in your mission.

Hope this helps
« Last Edit: 09 Sep 2002, 21:11:58 by Backoff »

RedLion

  • Guest
Re:Jumping from squad leader to squad leader
« Reply #2 on: 15 Sep 2002, 00:22:00 »
Hi Backoff: :)

Thank you for your reply.
I am not quite sure what you mean by changing the GroupArray values, :-\  but I did try to follow the instructions you specified.
I activated the script by using radio alpha and the response was: "1 follow 1". No errors were reported but I was not able to jump from squad to squad as their commander. ???
I just stood there, in the middle of the field echoing my own words ;D
Sorry for the lack of experience, but I will continue to try.
Thanks Backoff :)
Best Regards,
RedLion

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Jumping from squad leader to squad leader
« Reply #3 on: 19 Sep 2002, 02:30:45 »
Looks like you need following parameters to exec this script:

[player,0] exec "switch.sqs"

:note - the GroupArray value, for which i wrote 0 here
can be 0,1,2,3, because there are 4 squads.

In this case, you would take controll over group1
(GroupArray select 0 = group1 from the array: GroupArray)

:edit - ah yes, and to be able to switch between all the four
squads, you need to setup 4 triggers (one for each group)

~S~ CD
« Last Edit: 19 Sep 2002, 02:31:58 by Chris Death »
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Backoff

  • Guest
Re:Jumping from squad leader to squad leader
« Reply #4 on: 20 Sep 2002, 17:31:42 »
oops, forget this one...

Thanks Chris Death for the precisions  :)

Also you will need to give names to the groups you want to control and put these names in the _GroupArray variable