Jump to content

M1ke_SK

Member
  • Content Count

    471
  • Joined

  • Last visited

  • Medals

Everything posted by M1ke_SK

  1. Try to search first. vehicleName lockDriver true; More here lockDriver
  2. I have dog script on me too, but appriciated that you are making this public. Great work mate! Here is little snippet for sniffing out mines and explosives _dog = ... your dog agent; action player addAction [ "<t color='#ff0000'>Sniff bomb</t>", { params ["_target", "_caller", "_id", "_args"]; _dog = _args select 0; { (side _caller) revealMine _x; } forEach (nearestObjects [_dog, ["MineBase"], 12]); _dog say3D "bark"; }, [_dog], 1.5, true, true, "", true, 15, false ]; Hope it will be in some use to you johnnyboy Radius is set to 12m (40feet). Did some research on dogs :D
  3. M1ke_SK

    Re-spawn custom object

    You put this in init field of object null = [this] execVM "object.sqf"; object.sqf params ["_object"]; _pos = getPos _object; _dir = getDir _object; _class = typeOf _object; while { true } do { deleteVehicle _object; _object = createVehicle [_class, _pos, [], 0, "NONE"]; _object setDir _dir; waitUntil { sleep 1; !alive _object }; sleep 60; }; I did not include object orientation in 3D dimension (yawn, pitch, ...). I am using this technique for my vehicles to respawn.
  4. BIS_fnc_spawnGroup have return value group. So you have your group in _snp1 variable. In your case your group have only 1 unit. So you want to set position for every (just one) unit in this group. { _x setUnitPos "UP"; } forEach (units _snp1); You can use command units witch return all units from group in array format [_unit1, _unit2, ...]. Then you can iterate through each unit with forEach and set position for each unit in group. This _x in this case is magic variable used in forEach command to select current item in array (unit in array of units). Hope I make any sence to you :)
  5. _snp1 = [ [_pos select 0, _pos select 1, _height] , EAST, ["TBan_Sniper"],[],[],[],[],[],85] call BIS_fnc_spawnGroup; First argument in BIS_fnc_spawnGroup is _position (array). This array have syntax [ _x, _y, _z] (coordinates) where you set your elevation ( _z ) as hight from the ground. So in code above you select coordinates from marker position (_x and _y) and set custom _z.
  6. Leaking liquid [script] - v1.0 Description: Idea was to help fellow coders. Created liquid stream with particles effect. It can be used for leaking water, oil, blood, etc ... Included example mission with guy pissing and leaking oil truck. Enjoy. Installation: - place unit / truck in editor - in init of unit enter null = this execVM "pee.sqf"; //unit or null = this execVM "leek.sqf"; //truck Features: - leaking liquid - pissing - leaking fuel from truck untill fuel is empty Planned: - catch fire if leak is from oil - refactor to function - create leak hole in cistern upon fire - create leak hole in barrel upon fire (leaking water) - give option to choose color of stream (yellow, blue, black, ...) - multiplayer/dedicated server testing Changelog: v1.0 - public release License: Use it for public, non monetized purposes only. If you have modifications, use pull request in git repo. Will revise/include them in script. Disclaimer: Do not incorporate this script or portions of it in monetized products or servers without asking for permission and obtaining approval from me! Issues: - please use issue tracker - need more testing Download: https://bitbucket.org/mikehudak/a3_leaking_liquid Preview:
  7. I can do that in next update
  8. So you mean player use action and start to pee?
  9. You spawn sniper on marker position, but you set height in which unit will spawn, e.g. height of building _height = 20; //your height of building _pos = getMarkerPos "snp1m"; _snp1 = [ [_pos select 0, _pos select 1, _height] , EAST, ["TBan_Sniper"],[],[],[],[],[],85] call BIS_fnc_spawnGroup; Better solution should be spawn sniper on one of roof positions of building. (more here buildingPos ) Edit: Here is script for garrison units in buildings. Zenophon have there also option to garrison only roof of building. I think it may be useful to you. https://forums.bistudio.com/topic/170936-release-infantry-occupy-house-script/
  10. Little snippet to force fire "single-mode" player addEventHandler [ "fired", { params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"]; _bullets = _unit ammo _weapon; if(_bullets > 0) then { _unit setAmmo [_weapon, 0]; }; [_unit, _weapon, _bullets] spawn { params ["_unit", "_weapon", "_bullets"]; waitUntil { reloadEnabled _unit }; _unit setAmmo [_weapon, _bullets]; }; } ];
  11. M1ke_SK

    How to make AI charge

    Do you mean attack ? null = [_group, _position] call BIS_fnc_taskAttack;
  12. I reduced default timer to 10 seconds and added more colors and bigger matrix for more challenging defusing (you can customize it in script settings) Also specialist (engineer or demo expert) will have 2x more time to defuse bomb, like in ace3 where medic can heal 2x quicker. You can modify this coeficient now.
  13. Updated to version 1.1 Changelog: v1.1 - added ace3 support - added customizable explosion size - added customizable size of maxtrix - added more wires (custom) - specialist have more time to defuse bomb - custom time for specialist (default 2x time) - custom internal settings - added documentation - added simple mission for test
  14. Yes, will be in next update. (ace3 support)
  15. M1ke_SK

    AI Running Away

    Try use allowFleeing command ? _unit allowFleeing 0;
  16. - Double timer You can implement double timer within your mission with another loop to set off bombs like: if(timer == 0) exitWith { { /* detonate bombs here */ } forEach [bomb1, bomb2, bomb3, ...]; }; I think of that when I created this script but want to keep it "simple". You can always use trigger to count down when mission ends (bombs will destroy objective) or something. - Mod instead of script About mod. I think you will have more freedom if you use script, because people dont need to download other things(mods) just to play your mission. This way it is just plug-and-play. I am more "use-vanilla-sources-guy" in my missions, but I will considerate making some mod in future. - Advanced bomb I have few ideas to improve cutting wires. Something like: - adding more colors (more wires) - creating bigger matrix - cutting wires in right order - when wrong cut, timer will accelerate - "slippery hands" ( this is where I move toolkit from unit inventory and spawn it next to him, as he can't cut wires when he dont have toolkit) - probability of second wiring ( first wiring is dummy ) ...
  17. Should be. Tested only on MP, not dedicated.
  18. I am planning to create Dialog for cutting wires
  19. I am trying to attach 4x DemoCharge to barrel to make a explosive bomb. I have issue of understanding setVectorDirAndUp command. I managed to get 2 of 4 charges attach in right direction. What array need to set for setVectorDirAndUp to face them right ? Here is what I got so far: fn_bomb.sqf param ["_object"]; //Land_MetalBarrel_F { _c4 = "DemoCharge_Remote_Ammo" createVehicle [(getPos _object) select 0, (getPos _object) select 1, 2]; _c4 attachTo [_object, _x select 0]; _c4 setVectorDirAndUp (_x select 1); _c4 enableSimulationGlobal false; } forEach [ [[0,0.3,0], [[1,0,0],[0,1,0]]], [[0,-0.3,0], [[-1,0,0],[0,-1,0]]], [[0.3,0,0], [[1,-1,0],[1,1,0]]], //fix [[-0.3,0,0], [[1,1,0],[-1,1,0]]] //fix ]; This is simple 4 objects so no angles involved. I would like to attach more c4s facing right direction to barrel if possible.
  20. Edited code. Please review Also, dont know if "little box (Land_VR_Shape_01_cube_1m_F)" can be colored.
  21. Try this: fn_box.sqf params ["_box"]; _color = selectRandom [ "#(argb,8,8,3)color(0.9,0.1,0,1)", //default "#(argb,8,8,3)color(0,0.1,1,1)", //blue "#(argb,8,8,3)color(1,0,1,1)", //red "#(argb,8,8,3)color(0,1,0,1)", //green "#(argb,8,8,3)color(1,1,1,1)" //white ]; //[_box, [1, _color]] remoteExec ["setObjectTextureGlobal", 0]; //[_box, [1,"a3\characters_f_bootcamp\common\data\vrarmoremmisive.rvmat"]] remoteExec ["setObjectMaterialGlobal", 0]; _box setObjectTextureGlobal [1, _color]; _box setObjectMaterialGlobal [1, "a3\characters_f_bootcamp\common\data\vrarmoremmisive.rvmat"]; Edited: used "global" functions
  22. // ambientShootingRange.sqf _aiShooters = [XER_firingRange_Shooter_01,XER_firingRange_Shooter_02,XER_firingRange_Shooter_03]; _enemyTargets = [XER_firingRange_TargetE_01,XER_firingRange_TargetE_02,XER_firingRange_TargetE_03,...]; while { true } do { sleep random [4, 5, 6]; _shooter = selectRandom _aiShooters; _shooter dotarget selectRandom _enemyTargets; _shooter forceWeaponFire [currentWeapon _shooter, "Single"]; _shooter setVehicleAmmo 1; }; I dont see where you disable loop ( e.g. _playerTrainingPhase = true ) so you should make it global or set true in condition of loop. I take approach where you lower sleep interval and random soldier fire. It is more random = ambient.
  23. M1ke_SK

    SNOW

    If simple object had physx, then solution would be simplier, as we can use this: _snowflake addEventHandler ["EpeContact", { deleteVehicle _this select 0; }]; where if snowflake is in collision with something (hit roof of building or tree), it will delete it self (perish).
×