Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. function pickLocation(%db, %tryGroup)
  2. {...
  3. //check for open areas to spawn in around the spawnpoint
  4. %offset = getRandom(0, 10)-5 SPC getRandom(0, 10)-5 SPC "0";
  5. %pos = vectorAdd(%spawn.getPosition(), %offset);
  6. %mask = $TypeMasks::PlayerObjectType | $TypeMasks::VehicleObjectType | $TypeMasks::TerrainObjectType | $TypeMasks::StaticObjectType | $TypeMasks::StaticShapeObjectType;
  7. %okay = containerBoxEmpty(%mask,%pos,2);
  8. //no space? bail
  9. if(!%okay)
  10. {
  11. return false;
  12. }
  13. //spawn
  14. %player = AIPlayer::CustomAiSpawn(%spawn, %db);
  15. ...}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement