Scrigroup - Documente si articole

     

HomeDocumenteUploadResurseAlte limbi doc
AccessAdobe photoshopAlgoritmiAutocadBaze de dateCC sharp
CalculatoareCorel drawDot netExcelFox proFrontpageHardware
HtmlInternetJavaLinuxMatlabMs dosPascal
PhpPower pointRetele calculatoareSqlTutorialsWebdesignWindows
WordXml


Controlling the Groups: AddToGroup, CreateGroup

c



+ Font mai mare | - Font mai mic



Controlling the Groups

AddToGroup

Adds the specified units into the specified group



Note:

If the group names "_SELECTION_GROUP_N_0_" are used

where N is a number from 0 to 9 then it is possible for the player to access the unit groups in the interface with the keys 1-9

Syntax:

AddToGroup ( <ObjectType_1> <ObjectID_1> <GroupName>

This function/procedure uses the army identifier set with the help of the procedure SetWorkArmy

<ObjectType> - "UNIT" || "GROUP"

<ObjectID> - identifier of an object of the specified type (a constant or variable)

<GroupName> - name of the group for adding units (a string constant or a string variable)

Example:

[Trigger]

AddToGroup ( GROUP , "Group" , "_SELECTION_GROUP_1_0_" )

// Adds the group named Group into the interface group with the number 1

Halt

[Trigger]

SET @@GlobalUnit2ID = 2

SET @newLocalGroup = 'Group_MyNewGroup'

AddToGroup ( UNIT , @@GlobalUnit2ID , @newLocalGroup )

// Adds the unit with the ID 2 into the group Group_MyNewGroup

Halt

CreateGroup

Creates an empty group with the specified name

Note: the group names "_SELECTION_GROUP_N_N_" cannot be used

Syntax:

CreateGroup ( <GroupName>

<GroupName> - name of the group to be created (a string constant or variable)

Example:

[Trigger]

CreateGroup Temp" )

// Creates the temporary empty group named Temp

Halt

[Trigger]

SET @ NewGroupName = 'MyNewGroupName'

CreateGroup (@NewGroupName )

// Creates the temporary empty group named MyNewGroupName

Halt

CreateGroupByRect

Creates a group with the specified name in the given rectangular

Note: the group names "_SELECTION_GROUP_N_N_" cannot be used

Syntax:

CreateGroupByRect( GROUP <GroupID> , ARMY , <ArmyID> <UnitType> , <UnitNumber> , RECT , <RectID> , <filter>

<GroupID> - name of the group to be created (a string constant or variable)

<ArmyID> - name of the army for creating a group (a string constant or variable)

<UnitType> - "ALL" || "ARMOREDCAR" || "ARTILLERY" || "CAR" || "FLAK" || "FORTIFICATION" || "HMG" || "HUMAN" || "SPG" || "TANKS"

<UnitNumber> - creates a group using <= of the given number of units

<RectID> - identifier of the bounding rectangular (a constant or variable)

<Filter> - set of filters separated by spaces (commas): "BROKEN_WEAPON" || "OK_WEAPON" || "BROKEN_ENGINE" || "OK_ENGINE" || "EMPTY" || "NOT_EMPTY" || "CREW" || "PANIC" || "NO_PANIC"

The filter behavior is described in paragraph 3.5.9 GetNUnitsInArea

[Trigger]

CreateGroupByRect ( GROUP , 'Group102' , ARMY , 1 , ALL , RECT , 'Rect102' )

Halt

CreateGroupFromCrew

Creates a group with the specified name consisting of people that are in the given object

Note: the group names "_SELECTION_GROUP_N_N_" cannot be used

Syntax:

CreateGroupFromCrew ( GROUP <GroupID> , <ObjectType> , <ObjectID> <Filter>

This function/procedure uses the army identifier set with the help of the procedure SetWorkArmy with no influence exerted upon ObjectType - "ARMY"

<GroupID> - name of the group to be created (a string constant or variable)

<ObjectType> - "ARMY" || "UNIT" || "GROUP"

<ObjectID> - name of the object, from which the data is taken to create the group (a string constant or variable)

<Filter> - "CREW" || "PASSENGER" || "ALL"

[Trigger]

CreateGroupFromCrew ( GROUP , 'Group103' , GROUP , 'Group102' , CREW )

Halt

CreateGroupFromFreeCrew

Creates a group with the specified name consisting of free crews in the given rectangular

Note: the group names "_SELECTION_GROUP_N_N_" cannot be used

Syntax:

CreateGroupFromFreeCrew( GROUP <GroupID> , ARMY , <ArmyID> RECT , <RectID>

<GroupID> - name of the group to be created (a string constant or variable)

<ArmyID> - name of the army for creating a group (a string constant or variable)

<RectID> - identifier of the bounding rectangular (a constant or variable)

[Trigger]

CreateGroupFromFreeCrew ( GROUP , 'Group104' , ARMY , 1 , RECT , 'Rect2' )

Halt

CreateRectByObject

Creates a bounding rectangular area with the specified name around the specified unit set. This rectangular area will be present up to the end of the mission, even if units from the set are killed or moved. Use another call to CreateRectByObject to update this named rectangular area.

Note: the group names "_SELECTION_GROUP_N_N_" cannot be used

Syntax:

CreateRectByObject( RECT <RectID> , <SquareSize> <ObjectType> , <ObjectID> , <UnitType> , <delta> , <filter>

This function/procedure uses the army identifier set with the help of the procedure SetWorkArmy with no influence exerted upon ObjectType - "ARMY"

<RectID> - name of the rectangular to be created (a string constant or variable)

<SquareSize> - if -1 then all filtered units from the unit set are used. If >0 then the center of the needed rectangular area will be the place where the concentration of the filtered units from the given set is the highest. The SquareSize cannot exceed 500 meters in that case. It is recommended to call CreateRectByObject with the SquareSize>0 rarely, once every 5 or more seconds, to avoid performance problems

<ObjectType> - "ARMY" || "UNIT" || "GROUP"

<ObjectID> - name of the object for creating the rectangular (a string constant or variable)

<UnitType> - "ALL" || "ARMOREDCAR" || "ARTILLERY" || "CAR" || "FLAK" || "FORTIFICATION" || "HMG" || "HUMAN" || "SPG" || "TANKS"

<delta> - increment in the size of the rectangular along axes x and y (right - left and above - below)

<Filter> - set of filters separated by spaces (commas): "BROKEN_WEAPON" || "OK_WEAPON" || "BROKEN_ENGINE" || "OK_ENGINE" || "EMPTY" || "NOT_EMPTY" || "CREW" || "PANIC" || "NO_PANIC"

The filter behavior is described in paragraph 3.5.9 GetNUnitsInArea

[Trigger]

CreateRectByObject ( RECT , 'Rect102' , GROUP , 'Group1' , 4 )

Halt

DeleteGroup

Deletes a group with the specified name

Note: the group names "_SELECTION_GROUP_N_N_" cannot be used

Syntax:

DeleteGroup ( <GroupName>

<GroupName> - name of the group to be deleted (a constant or a name of a variable)

Example:

[Trigger]

DeleteGroup Temp" )

// Deletes the temporary empty group named Temp

Halt

[Trigger]

SET @groupToDelete = "Temp"

DeleteGroup (@groupToDelete )

// Deletes the temporary group named Temp

Halt

RemoveFromGroup

Removes the specified units from the group

If the group names "_SELECTION_GROUP_N_0_" are used

where N is a number from 0 to 9 then it is possible for the player to acceess the unit groups in the interface with the keys 1-9

Syntax:

RemoveFromGroup ( <ObjectType_1> <ObjectID_1> <GroupName>

This function/procedure uses the army identifier set with the help of the procedure SetWorkArmy

<ObjectType> - "UNIT" || "GROUP"

<ObjectID> - identifier of an object of the specified type (a constant or variable)

<GroupName> - name of the group for removing the units (a string constant or variable)

Example:

[Trigger]

RemoveFromGroup ( GROUP , "Group" , "_SELECTION_GROUP_1_0_" )

// Removes the group named Group from the interface group with the number 1

Halt

[Trigger]

SET @groupVar = "Group"

RemoveFromGroup ( UNIT , 1 , @groupVar )

// Removes unit 1 from the group named Group

Halt

[Trigger]

SET @groupVar = "removedGroup"

RemoveFromGroup ( GROUP , @groupVar , "Group" )

// Removes the group removedGroup from the group named Group

SetGroupFormation

Sets the formation for the given group

Syntax:

SetGroupFormation ( <GroupName> <FormationType>

This function/procedure uses the army identifier set with the help of the procedure SetWorkArmy

<GroupName> - name of the group (a string constant or variable)

<FormationType> - "DISPERSE" || "GATHER" || "CUSTOM" || "LINETANKHUMAN" || "COLUMN" || "WEDGE"

Example:

[Trigger]

SetGroupFormation GroupToMove' , WEDGE )

// The group GroupToMove should use the formation WEDGE; after this any command given to the group GroupToMove will be executed in the formation WEDGE

Halt

[Trigger]

SET @groupVar = "GroupToAttack"

SetGroupFormation ( @groupVar1 , WEDGE )

// The group GroupToAttack should use the formation WEDGE; after this any command given to the group GroupToAttack will be executed in the formation WEDGE

Halt



Politica de confidentialitate | Termeni si conditii de utilizare



DISTRIBUIE DOCUMENTUL

Comentarii


Vizualizari: 833
Importanta: rank

Comenteaza documentul:

Te rugam sa te autentifici sau sa iti faci cont pentru a putea comenta

Creaza cont nou

Termeni si conditii de utilizare | Contact
© SCRIGROUP 2024 . All rights reserved