OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: dragonshinobi03 on 19 Jan 2004, 04:14:35

Title: DONT WANT TO BE A LEADER when team is made
Post by: dragonshinobi03 on 19 Jan 2004, 04:14:35
Hi FELLOW OPF: players
 I am making my first mission so sorry if i dont make sense

When radio 0-0-1 is triggered a group of special forces is made and they moves in cargo of a blackhawk, At the same time the the script is triggered i moveincargo with the squad and i group with them but i just dont wanna be a leader
here is the script:

Code: [Select]
;***********************************
;*Special Forces coming out house1**
;*by: tenzin phuri                **
;***********************************

;--------------------------------------------------------------------------------------
"OfficerW" createunit [getMarkerPos "soldierspawn1",sf1,"asf1=this",1,"LIEUTENANT"]

"SoldierWMG" createunit [getMarkerPos "soldierspawn1",sf1,"asf2=this",1,"SERGEANT"]

"SoldierWG" createunit [getMarkerPos "soldierspawn1",sf1,"asf3=this",1,"CORPORAL"]

"SoldierWG" createunit [getMarkerPos "soldierspawn1",sf1,"asf4=this",1,"CORPORAL"]

"SoldierWLAW" createunit [getMarkerPos "soldierspawn1",sf1,"asf5=this",1,"PRIVATE"]

"SoldierWMedic" createunit [getMarkerPos "soldierspawn1",sf1,"asf6=this",1,"PRIVATE"]

"SoldierWG" createunit [getMarkerPos "soldierspawn1",sf1,"asf7=this",1,"CORPORAL"]

"SoldierWMedic" createunit [getMarkerPos "soldierspawn1",sf1,"asf8=this",1,"PRIVATE"]

"SoldierWLAW" createunit [getMarkerPos "soldierspawn1",sf1,"asf9=this",1,"PRIVATE"]

"SoldierWMG" createunit [getMarkerPos "soldierspawn1",sf1,"asf10=this",1,"SERGEANT"]

"SoldierWG" createunit [getMarkerPos "soldierspawn1",sf1,"asf23=this",1,"CORPORAL"]

"SoldierWG" createunit [getMarkerPos "soldierspawn1",sf1,"asf24=this",1,"CORPORAL"]
;--------------------------------------------------------------------------------------
"_x moveincargo bh1" foreach units sf1
player moveincargo bh1
exit
sorry if it dont make sense i dont write english good.
anything is grateful
thanks in advance :-* :-* :-* :-*
Title: Re:DONT WANT TO BE A LEADER when team is made
Post by: dragonshinobi03 on 19 Jan 2004, 04:16:20
and 1 more thing i dont know how to group my self with the team when script is triggered
WILL someone edit my script and send it to me or post it please
THanks you very much
thanks again in advance :-* :-*
Title: Re:DONT WANT TO BE A LEADER when team is made
Post by: macguba on 19 Jan 2004, 11:47:17
I'm no scripter but I think the problem is that the soldiers you create are joining the group that the player is in. (sf1)   The player is the only member of that group before the createUnit script, so he becomes the leader.

What you need to do is create the soldiers in another group.  Lets call it sf2.    You will have to create this group in the Mission Editor for the createUnit command to work.    Create a gamelogic and place it anywhere on the map.   In its init field write

sf2 - group this; deleteVehicle this

Now, change the group in all your createUnit commands from sf1 to sf2.    At the end add a line of code

[player] join sf2

Hope that helps.
Title: Re:DONT WANT TO BE A LEADER when team is made
Post by: Artak on 19 Jan 2004, 12:18:44
Also make sure the lads don't pull the rank on you  ;D I.e. Make sure that you're not higher than a sergeant
Title: Re:DONT WANT TO BE A LEADER when team is made
Post by: dragonshinobi03 on 19 Jan 2004, 20:14:51
HEY THANKS FOR THE QUICK REPLY :o
       I will give those a try
THANKS AGAIN 8)
Title: Re:DONT WANT TO BE A LEADER when team is made
Post by: Chris Death on 20 Jan 2004, 12:28:27
Also note that OFP groups are limited to 12 men.

In your case you are creating 12 men, therefore there's
no space left for you to join the group.

~S~ CD
Title: Re:DONT WANT TO BE A LEADER when team is made
Post by: dragonshinobi03 on 24 Jan 2004, 00:25:21
yea is there a command to group two groups together.
Title: Re:DONT WANT TO BE A LEADER when team is made
Post by: macguba on 24 Jan 2004, 00:37:55
Use the command join

[loon1,loon2] join player

or

units grp1 join player

Check the syntax ... dunno if it works fora  group like that