Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Create map hunt
- int tableHuntRes = GetResourcePerPlayerFromTable(mapResourcesTable, settingMapResources, (int)mapResourceTypes.eHuntable) / cNumberNonSpectatorPlayers;
- Constraint huntAvoidPond = new AreaDistanceConstraint("hunt avoid pond", pond, 15.0f);
- Constraint huntAvoidIsland = new AreaDistanceConstraint("hunt avoid island", island, 20.0f);
- Constraint huntAvoidTrees = new TypeDistanceConstraint("hunt avoid trees", "tree", 10.0f);
- Constraint huntAvoidPlayers = new ClassDistanceConstraint("hunt avoid players", mPlayerAreas, 25.0f);
- Constraint huntAvoidHunt = new TypeDistanceConstraint("hunt avoid hunt", huntableType, 55.0f);
- Constraint hunt1Area = new AreaDistanceConstraint("hunt 1 area", splitMap2, 25.0f);
- Constraint hunt2Area = new AreaDistanceConstraint("hunt 2 area", splitMap1, 25.0f);
- /// Maybe important note, X and Z locations set to -1, hopefully meaning random, so that they only follow the constraints and not placement.
- /// Not sure if this works tbh but it seems ok for this particular thing
- List<Constraint> hunt1Constraints = new List<Constraint>() { avoidEdge, huntAvoidPond, huntAvoidTrees, huntAvoidPlayers, huntAvoidHunt, hunt1Area };
- //for (int i = 0, id = 0; i < GetResourcePerPlayerFromTable(mapResourcesTable, settingMapResources, (int)mapResourceTypes.eHuntable); ++i, ++id)
- for (int i = 0, id = 0; i < tableHuntRes + cNumberNonSpectatorPlayers; ++i, ++id)
- {
- createSkirmishHuntables(hunt1Constraints, "Huntables 1" + id, 1, suggestedHuntableNum, suggestedHuntableNum + 2, 0.5f, -1, -1);
- }
- List<Constraint> hunt2Constraints = new List<Constraint>() { avoidEdge, huntAvoidPond, huntAvoidTrees, huntAvoidPlayers, huntAvoidHunt, hunt2Area };
- for (int i = 0, id = 0; i < tableHuntRes + cNumberNonSpectatorPlayers; ++i, ++id)
- {
- createSkirmishHuntables(hunt2Constraints, "Huntables 2" + id, 1, suggestedHuntableNum, suggestedHuntableNum + 2, 0.5f, -1, -1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement