Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. // Create map hunt
  2. int tableHuntRes = GetResourcePerPlayerFromTable(mapResourcesTable, settingMapResources, (int)mapResourceTypes.eHuntable) / cNumberNonSpectatorPlayers;
  3.  
  4. Constraint huntAvoidPond = new AreaDistanceConstraint("hunt avoid pond", pond, 15.0f);
  5. Constraint huntAvoidIsland = new AreaDistanceConstraint("hunt avoid island", island, 20.0f);
  6. Constraint huntAvoidTrees = new TypeDistanceConstraint("hunt avoid trees", "tree", 10.0f);
  7. Constraint huntAvoidPlayers = new ClassDistanceConstraint("hunt avoid players", mPlayerAreas, 25.0f);
  8. Constraint huntAvoidHunt = new TypeDistanceConstraint("hunt avoid hunt", huntableType, 55.0f);
  9.  
  10. Constraint hunt1Area = new AreaDistanceConstraint("hunt 1 area", splitMap2, 25.0f);
  11. Constraint hunt2Area = new AreaDistanceConstraint("hunt 2 area", splitMap1, 25.0f);
  12.  
  13. /// Maybe important note, X and Z locations set to -1, hopefully meaning random, so that they only follow the constraints and not placement.
  14. /// Not sure if this works tbh but it seems ok for this particular thing
  15. List<Constraint> hunt1Constraints = new List<Constraint>() { avoidEdge, huntAvoidPond, huntAvoidTrees, huntAvoidPlayers, huntAvoidHunt, hunt1Area };
  16. //for (int i = 0, id = 0; i < GetResourcePerPlayerFromTable(mapResourcesTable, settingMapResources, (int)mapResourceTypes.eHuntable); ++i, ++id)
  17. for (int i = 0, id = 0; i < tableHuntRes + cNumberNonSpectatorPlayers; ++i, ++id)
  18. {
  19. createSkirmishHuntables(hunt1Constraints, "Huntables 1" + id, 1, suggestedHuntableNum, suggestedHuntableNum + 2, 0.5f, -1, -1);
  20. }
  21.  
  22. List<Constraint> hunt2Constraints = new List<Constraint>() { avoidEdge, huntAvoidPond, huntAvoidTrees, huntAvoidPlayers, huntAvoidHunt, hunt2Area };
  23. for (int i = 0, id = 0; i < tableHuntRes + cNumberNonSpectatorPlayers; ++i, ++id)
  24. {
  25. createSkirmishHuntables(hunt2Constraints, "Huntables 2" + id, 1, suggestedHuntableNum, suggestedHuntableNum + 2, 0.5f, -1, -1);
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement