Forum Jump :

Author Message


Posts: 62
Rank:


Level: Member

Country: ai
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2011-02-07 11:51        
     
Hi,

1. How can I set a unit leader of a group?

I have a spawning script that I made:

if (!local Server) exitWith {};

"SoldierGB" createUnit [getMarkerPos "marker_1", _group1, 0.75, "private"];
"SoldierGB" createUnit [getMarkerPos "marker_1", _group1, 0.75, "private"];
"SoldierGB" createUnit [getMarkerPos "marker_1", _group1, 0.75, "private"];
"SoldierGB" createUnit [getMarkerPos "marker_1", _group1, 0.75, "private"];

2. How can I send the leader/group to a waypoint or Defend or on a SeekAndDestroy?


Author Message


Posts: 20403
Rank:


Level: Super Admin

Country: nl
Location: The Netherlands
Occupation:
Age: 42
In-game name: Foxhound

 
#2 Posted at 2011-02-07 12:05        
     
To set a leader just edit your syntax:
type createUnit [ position, group, init, skill, rank] 
Highest rank will be the leader.

In the init section you can add a waypoint:
http://community.bistudio.com/wiki/addWaypoint

This post was edited by Foxhound (2011-02-07 13:03, ago)

Visit my family webshop desteigerhoutshop.nl.

Advertisement


Author Message


Posts: 62
Rank:


Level: Member

Country: ai
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2011-02-07 16:11        
     
OK, so it does that automatically right? Set the leader based on the highest skill in the group.

And will this do for waypoints and GUARD commands or SeekAndDestroy?:

_wp1 = _group1 addWaypoint [position markerWP];


_wp2 = group2 addWaypoint [ getpos markerWP1];
[group2] setWPPos getpos markerWP1;
[group2] setWaypointType "GUARD";


Author Message


Posts: 20403
Rank:


Level: Super Admin

Country: nl
Location: The Netherlands
Occupation:
Age: 42
In-game name: Foxhound

 
#4 Posted at 2011-02-07 19:43        
     
The _group1 is local in your spawn script. If you add all the waypoint scripting in the same script file it should work.
I am out of the scripting loop but I guess you should make sure you create a waypoint first, otherwise you can not add it....right?

Visit my family webshop desteigerhoutshop.nl.

Author Message


Posts: 62
Rank:


Level: Member

Country: ai
Location:
Occupation:
Age:
In-game name:

 
#5 Posted at 2011-02-08 17:51        
     
Yes, its supposed to be marker that I use as waypoint or SeekAndDestroy. It can work with a marker right or does it have to be something else?






Tags: Howto, Leader, Set, Unit