CATEGORY NAME: GROUP AND SET FUNCTIONS containerBoxFillSet(Set, Mask, Position, Length, Width, Height, SHeight); ARG: Set: Block of room setup to hold objects. Mask: Defines what object or objects to search for. Mask Values: $SimTerrainObjectType, $SimInteriorObjectType, $SimPlayerObjectType, $MineObjectType, $MoveableObjectType, $VehicleObjectType, $StaticObjectType, $ItemObjectType Position: Center position of the area to search. Length: Length of the area to search. Width: Width of the area to search. Height: Height of the area to search. SHeight: Allows the height area to start at the Positions Z value and go up a distance of SHeight.. EXPLAIN: Creates a box of size Length, Width, and Height around the point specified by Position. Position is now the center of our box. It will then search all objects with in that box area and with the given type(s) specified by Mask and store them in the Set. Set now holds all the objects that you where looking for. Use functions like Group::getObject to iterate through the Set. Make sure you delete the Set when you are finished. For example: We want a box of size L=100, W=100, H=100 with the center of the box being at location P=(30,50,60). Set = newObject("set",SimSet); Pos = "30 50 60"; Mask = $VehicleObjectType | $MineObjectType; num =containerBoxFillSet(Set, Mask, Pos, 100, 100, 100,0); Set now holds all vehicles and mines found in that area. Finished with set so.. deleteObject(Set); USED IN: Game.cs, Item.cs, Mine.cs, Objectives.cs, and Station.cs RETURN: Number. Number of Objects added to the Set. If failed then "False". Group::iterateRecursive(Group or Set, Function, [Arg1, ...]); ARG: Group or Set: Block of space setup to hold objects. Function: The function to be performed on all the objects in the Group or Set. Arg1: Arguments that need to be passed to the Function. If Function takes no arguments then only pass Group or Set and Function. EXPLAIN: Used to perform the Function on all objects in the Group or Set. USED IN: Objective.cs RETURN: 0. Group::objectCount(Group or Set); ARG: Group or Set: Block of room setup to hold objects. EXPLAIN: Used to count the number of objects in a Group or Set. USED IN: AI.cs, Game.cs, Objectives.cs, Station.cs, ... RETURN: Number. Objects in the Group or Set. If failed then 0. Group::getObject(Group or Set, Index); ARG: Group or Set: Block of room setup to hold objects. Index: The object to be extracted from the Group or Set. EXPLAIN: Used to get a specific object out of the Group or Set. For example: Set holds these objects 8439, 8449, 8663. Where 8439 is Index 0, 8449 is Index 1, and so on... We want object 8449 so we set Index = 1; Object = Group::getObject(Set, Index); Object now holds the object Id(8449). USED IN: AI.cs, Game.cs, Item.cs, Objectives.cs, Station.cs, ... RETURN: The desired object extracted from the Group or Set. If failed then -1. removeFromSet(Group or Set, Index); ARG: Set or Group: Block of space setup to hold objects. Index: The object to be extracted from the Group or Set. EXPLAIN: Used to remove an object from a Group or Set. Look at the Group::getObject function for an example. USED IN: Objectives.cs RETURN: True if succeed. False if failed. addToSet(Set or Group, Object); ARG: Set or Group: The area to add the Object to. Object: The object wanted to be add to the Set or Group. EXPLAIN: Used to add an Object to a Set or Group. USED IN: Item.cs, Missiontypes.cs, NewMission.cs, Player.cs, ... RETURN: True if succeed or False if failed. getGroup(Object); ARG: Object: The object Id. Example: 8361. EXPLAIN: Used to get what Group the object is currently in. USED IN: Objectives.cs, Station.cs, Trigger.cs RETURN: Group Id. activateGroup(Group or Set); ARG: Group or Set: Block of room setup to hold objects. EXPLAIN: Used to trigger all objects in the Group or Set. USED IN: Currently not used in any script files. RETURN: True if succeed or False if failed. nameToID(Name); ARG: Name: The name of a Group or Set. EXPLAIN: This will convert a Group or Set Name into its Id. For example: Look at the function Game::pickRandomSpawn in the game.cs file. Also look at the raindance.mis file. In the mis file you will find a directory tree like this MissionGroup/Teams/team0/DropPoints/Random. Under the Random group are a bunch of waypoints. So when the nameToId(NAME) is called it returns the location where all the waypoint can be found. So Game::pickRandomSpawn randomly picks one of the waypoints in the Random group. USED IN: Ai.cs, Game.cs, Objectives.cs RETURN: Id. Id of the Group or Set. Example: 8632. If failed then -1.