Advertisement
Halvhjearne

DebugPic.sqf

Apr 30th, 2015
574
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.37 KB | None | 0 0
  1. if(isServer)then{
  2. /*
  3.     DebugPic script
  4.     by Halv, idea from machine6fd's mission.sqm version
  5.  
  6.     Copyright (C) 2015  Halvhjearne
  7.  
  8.     This program is free software: you can redistribute it and/or modify
  9.     it under the terms of the GNU General Public License as published by
  10.     the Free Software Foundation, either version 3 of the License, or
  11.     (at your option) any later version.
  12.  
  13.     This program is distributed in the hope that it will be useful,
  14.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.     GNU General Public License for more details.
  17.  
  18.     You should have received a copy of the GNU General Public License
  19.     along with this program.  If not, see <http://www.gnu.org/licenses/>.
  20.  
  21.     Contact : halvhjearne@gmail.com
  22. */
  23.  
  24.     _pic1 = [
  25. //North wall
  26. //build this picture/texture? (true / false)
  27.         true,
  28. //Change to your picture/path here
  29.         "custom\dkflag.jpg"
  30.     ];
  31.     _pic2 = [
  32.     //East wall
  33. //build this picture/texture? (true / false)
  34.         false,
  35. //Change to your picture/path here
  36.         "custom\dkflag.jpg"
  37.     ];
  38.     _pic3 = [
  39.     //South wall
  40. //build this picture/texture? (true / false)
  41.         true,
  42. //Change to your picture/path here
  43.         "loadscreen.jpg"
  44.     ];
  45.     _pic4 = [
  46.     //West wall
  47. //build this picture/texture? (true / false)
  48.         false,
  49. //Change to your picture/path here
  50.         "custom\dkflag.jpg"
  51.     ];
  52.  
  53.  
  54. //======================== Do not touch anything below this point ========================\\
  55.     _alltextures = [[_pic1 select 0,_pic1 select 1,[-0.4,10,-4],0],[_pic2 select 0,_pic2 select 1,[16.5,.4,-4],90],[_pic3 select 0,_pic3 select 1,[-0.4,-9.5,-4],180],[_pic4 select 0,_pic4 select 1,[-17.2,.1,-4],270]];
  56.     _rwest = getMarkerPos "respawn_west";
  57.     diag_log "[DebugPic]: Waiting for 'Debug_static_F' to be build ...";
  58.     waitUntil{count(nearestObjects [_rwest, ["Debug_static_F"], 30]) > 0};
  59.     _box = nearestObject [_rwest, "Debug_static_F"];
  60.     _objs = [];
  61.     {
  62.         if(_x select 0)then{
  63.             _pic = (_x select 1);
  64.             _rPos = _box modelToWorld (_x select 2);
  65.             _rDir = (getDir _box)+(_x select 3);
  66.             _obj = createVehicle ["UserTexture10m_F", _rPos, [], 0, "CAN_COLLIDE"];
  67.             _obj setDir _rDir;
  68.             _obj setPos _rPos;
  69.             _obj enableSimulation false;
  70.             _obj setObjectTextureGlobal [0,_pic];
  71.             diag_log format["[DebugPic]: build texture @ %1 [%2,%3] texture '%4'",worldName,_obj,_rPos,_rDir,_pic];
  72.         };
  73.     }forEach _alltextures;
  74. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement