Jump to content
Sign in to follow this  
Rejn

Spawned units setrank problem...

Recommended Posts

I have some spawn scripts which are working fine but:

SCRIPT:

I have a global group called plat5 into which local script units spawn such as _unitl, _unit etc

They have a waypoint which when reached makes variable rein2=true

if rein2 is true and the players group which is called plat1 looses 6 men then all units from plat5 will join the players group plat1.

PROBLEM: Everything works fine except that all the units seem to have pvt instead of corporal or Sgt written next to their name in the group tab on the map...

consequently the player ends up being leader automatically when the sqd leader dies.

#QUESTION1 : WHY ARE UNITS JOINING THE GROUP AS PRIVATE?

I use _unit setrank corporal

#QUESTION2 : HELP WITH A SCRIPT THAT SELECTS A LEADER IN SQUAD OTHER THAN PLAYER

I have select leader but I would like a script that counts all units in a group and chooses a leader among them except the player... preferably based on rank.

Does anyone have any ideas? Might have to do an array or something and then do a find/count command. Thanks.

Share this post


Link to post
Share on other sites

Thankyou smile_o.gif its always the smallest of things that make me feel like the biggest of idiots smile_o.gif hehe thanks again.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×