| Blockland Forums > Modification Help |
| Getting certain object. |
| (1/1) |
| DYLANzzz:
I have 5 five trigger objects in the map (that load with the mission). How would I get these into some sort of group. And whats the difference between a SimSet and a SimGroup? |
| Chrono:
--- Quote from: DYLANzzz on September 11, 2010, 08:51:23 PM ---I have 5 five trigger objects in the map (that load with the mission). How would I get these into some sort of group. --- End quote --- Put this around the 5 triggers in the .mis file: new SimGroup(MissionTriggers){ //Triggers in here plox. }; Do this somewhere after the sun/sky/terrain/water/etc. --- Quote from: DYLANzzz on September 11, 2010, 08:51:23 PM ---And whats the difference between a SimSet and a SimGroup? --- End quote --- Both SimSet and SimGroup add objects into themself as a list. Difference being that an object in a SimGroup will actually be in that group, an no other group. That group will be returned using obj.getGroup(); A SimSet adds objects into itself, but the objects are not actually in it as a group. This makes it easier to loop through objects that need to be in another group. |
| DYLANzzz:
--- Quote from: Chrono on September 11, 2010, 09:40:12 PM ---new SimGroup(MissionTriggers){ //Triggers in here plox. }; [\quote] Just out of curiosity. Why not use a Simset? --- End quote --- |
| Chrono:
Because you shouldn't create objects inside a simset. |
| Navigation |
| Message Index |