Jump to content

buliwyf

Member
  • Content Count

    911
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by buliwyf

  1. Hello.. I tried to get the ObjectGrabber.sqf to work getting the init entries of objects but i have no luck. //Validate parameter count if ((count _this) < 2) exitWith {diag_log "Log: [objectGrabber] Function requires at least 2 parameter!"; false}; private ["_anchorPos", "_anchorDim"]; _anchorPos = _this select 0; _anchorDim = _this select 1; //Validate parameters if ((typeName _anchorPos) != (typeName [])) exitWith {diag_log "Log: [objectGrabber] Anchor position (0) must be an Array!"; false}; if ((typeName _anchorDim) != (typeName 0)) exitWith {diag_log "Log: [objectGrabber] Covered area size (1) must be an Number!"; false}; private ["_objs"]; _objs = nearestObjects [_anchorPos, ["All"], _anchorDim]; diag_log "#####################################"; diag_log "### Log: objectGrabber: StartGrabbing"; diag_log "#####################################"; for "_i" from 0 to ((count _objs) - 1) do { private ["_obj", "_type"]; _obj = _objs select _i; _type = typeOf _obj; //Exclude human objects. private ["_sim"]; _sim = getText (configFile >> "CfgVehicles" >> _type >> "simulation"); if !(_sim in ["soldier"]) then { private ["_objPos", "_dX", "_dY", "_z", "_azimuth", "_fuel", "_damage", "_vehicleInit"]; _objPos = position _obj; _dX = (_objPos select 0) - (_anchorPos select 0); _dY = (_objPos select 1) - (_anchorPos select 1); _z = _objPos select 2; _azimuth = direction _obj; _fuel = fuel _obj; _damage = damage _obj; _vehicleInit = _obj getVariable "vehicleInit"; if (isNil "_vehicleInit") then {{}} else {_obj getVariable "vehicleInit";}; // _obj setvariable ["vehicleInit",_vehicleInit]; diag_log text(format ["%1,", [_type, [_dX, _dY, _z], _azimuth, _fuel, _damage, _vehicleInit]]); }; }; diag_log "###################################"; diag_log "### Log: objectGrabber: EndGrabbing"; diag_log "###################################"; true This is my actual code (got it somewhere from the www and edited it a little). But in the RPT file the vehicleInit is empty... ["Land_HBarrier5",[0.951172,-3.62695,-0.00756836],305,1,0,<null>], ["Land_HBarrier5",[5.875,-4.28906,0.000518799],215,1,0,<null>], ["Land_Fire_barrel_burning",[3.23633,-6.30762,3.05176e-005],360,1,0,<null>], ["Land_HBarrier5",[10.3994,-7.37598,-0.000488281],215,1,0,<null>], ["Land_HBarrier_large",[-9.47461,5.01855,0.000305176],215,1,0,<null>] It puts me the <null> code in the RPT file. Do anyone get it to work?
  2. Thank you guys... that worked. Life is not easy... ;)
  3. No i simply puted the init entries like i always do. Example from misson.sqm: init="this setpos [(getpos this) select 0, (getpos this) select 1, 1.35];"; I thought it was possible to read the init entries with the getVariable command... =/ Wondering that it isn`t possible...
  4. Check if your file ending is "blah.sqf.txt" instead. You will find the setting in your File Explorer. Something like "Hide file extension by known file types"...
  5. You already fixed the double .sqf entry in the filename?
  6. Your briefing parts are for players on the WEST side. In your mission.sqm i see all players are CIVILIAN... so now you should know what you have to do...:292:
  7. The ArmA2 Scripting Commands page is full of explanations what _x is used for... there is also a search function available... :protest: greetz
  8. You really should learn some scripting basics instead of creating your own scripting language... ;) A look into my signature may help a little...
  9. @Odyseus Your keyboard seems to be broken... fix it! :D You can create a new trigger after deleting the original one. All you need is here. greetz
  10. The problem is in line number 0... you cannot start a SQF-file with "exec"-command. Use execVM instead! ;)
  11. If you use sleep 2; instead of ~2 in a SQS-file you will get those errors... ;)
  12. Never heard about locked vehicles created by createVehicle command... if you test in multiplayer mode it is possible that your client don`t know about the new vehicle. Check it by targeting the vehicle and do a right click on it. Sometimes you will get the action menu entries after that procedure... :803:
  13. buliwyf

    ; instead of {?

    May be I`m wrong, because i have no config expirences... buuut shouldn`t it look like this: class House : NonStrategic {}; class ViewTower2 : House {}; :confused:
  14. Laptop always works fine for me... possible you should make it undestroyable?!
  15. _lapcol should be lapcol in a global area...
  16. buliwyf

    Script to add a trigger?

    Scripting basics... the difference between... execVM and exec And take a look into my signature... :)
  17. Thank you very much for searching the forum first... ;)
  18. Take a look into the readMe of the mission. You will find there what you need.. it helped me much... ;o)
  19. buliwyf

    Show Id Numbers

    Local: _fence Global: fence So use in trigger: fence = getPos mapHouse3 nearestObject 78565; fence hideObject true; ;)
  20. if(local NameOfTheUnit)then{disableUserInput true;}; ...and take a look into the links of my signature. You will find there some basic scripting commands and How To`s. :icon_idea:
×