Jump to content

Grumpy Old Man

Member
  • Content Count

    4333
  • Joined

  • Last visited

  • Medals

Everything posted by Grumpy Old Man

  1. I'm sure he meant to write: pipe1 = createVehicle ["Land_ConcretePipe_F",getposATL thepole,[],0,"NONE"]; Since the original example was holding an error in the Z coordinate of the position: pipe1 = createVehicle ["Land_ConcretePipe_F",[position thepole select 1, position thepole select 2, getPosATL thepole select 1],[],0,"NONE"]; Cheers
  2. Grumpy Old Man

    hideObjectGlobal remove shadows and actions?

    Why not just get rid of the backpack and add an invisible ammocrate addAction to the player? Cheers
  3. Grumpy Old Man

    MGM Foods

    Everytime I eat it depletes my stamina for an hour. Neat addon, really like it so far, well done. Now to make some food ration resupply missions. Cheers
  4. Not sure if that's what you need, giving a less abstract example would definitely help here. Try something like an array, holding boolean values: TAG_fnc_myStates = [false,false,false,false,false]; //changing states: TAG_fnc_myStates set [2,true]; //results in [false,false,true,false,false] //to check for a state would be TAG_fnc_myStates#2 // would be true Alternatively you could look into BIS_fnc_bitflagsCheck for more complex states. Cheers
  5. Grumpy Old Man

    help on bubble script 2.0

    Just use _H1 then, should work anyway. It's best to call and spawn marker related stuff from initPlayerLocal.sqf to make sure it runs on every connected player, should work in SP, MP and dedicated. Alternatively you can draw stuff on the map like this: //initPlayerLocal.sqf GOM_fnc_drawUnit = { _eh = ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", ' { _scale = 0.2; _lastname = ""; _color = [1,1,1,1]; _text = format [''Unit %1'',(missionNamespace getVariable [''GOM_fnc_unitsToDraw'',[]] find _x) +1]; _align = "right"; _fontsize = 0.04; _drawicon = ""; _drawicon = configFile/"CfgVehicles"/typeOf _x/"Icon"; (_this select 0) drawIcon [getText (_drawicon), _color, getPosVisual _x, 0.5/ctrlMapScale (_this select 0), 0.5/ctrlMapScale (_this select 0), getDirVisual _x, _text, 1, _fontsize, "TahomaB", _align]; } foreach (missionNamespace getVariable ["GOM_fnc_unitsToDraw",[]])']; }; [] call GOM_fnc_drawUnit; //init.sqf or whenever you've spawned hostages in: missionNamespace setVariable ["GOM_fnc_unitsToDraw",[Hostage1,Hostage2],true]; //add another hostage to the drawing function: _toDraw = missionNamespace getVariable ["GOM_fnc_unitsToDraw",[]]; _toDraw pushBack _myNewHostage; missionNamespace setVariable ["GOM_fnc_unitsToDraw",_toDraw,true]; If you don't want anything drawn simply use this: missionNamespace setVariable ["GOM_fnc_unitsToDraw",[],true]; If you spawn in units that should be drawn simply add them to that array like shown above. Advantage of this is that the display of units is extremely fluid. Pretty basic, really. Cheers
  6. Grumpy Old Man

    help on bubble script 2.0

    Well that's not how you use remoteExec. You're trying to pass code as parameters, which isn't supported. You can define your code as a function, and pass the function instead: //init.sqf or wherever TAG_fnc_updateMarker = { params ["_unit","_markerName"]; while {alive _unit} do { _markerName setmarkerpos getpos _unit; sleep 11; }; }; //proper remoteExec usage: [YourHostageName,"YourMarkerName"] remoteExec ["TAG_fnc_updateMarker",0,true]; Cheers
  7. Sure it's possible. Do you want to script it on your own or want somebody else to do it? I could do it for you, for the amount of Cheers
  8. It's usually helpful to be as detailed as possible, saying you have problems with 3 scripts made by 3 different authors doesn't really go far, besides people suggesting to contact the original authors. Also depends on how you test this stuff. Locally hosted MP is something different than a dedicated server, especially when calling script from initServer.sqf or from init.sqf with the all too famous "if (!isServer) exitWith {}" followed by various "player" commands paradoxon. Cheers
  9. Grumpy Old Man

    Getting Ai unit to Banzai charge ?

    With scripting it's best to take things literally, so if something says "YourUnitName" it doesn't mean squad designation, heh. Usually refers to the variable name you're giving a unit inside the editor: Right Click on Unit Attributes... Object Init: Variable Name You can put the function call into a trigger, script or basically anywhere you seem fit. Cheers
  10. Don't pause anything, make 2 functions. One function to handle vehicle spawning and crew spawning. Another function to control when the spawning function should be called, as in the example above. This way there's even no need to loop anything. Cheers
  11. Grumpy Old Man

    BM21 Grads not firing on target (CUP)

    You could post in the CUP thread, from what it looks like the CUP grad21 doesn't seem to be properly configured, since the arty gun doesn't have any optics when using it as a player. Artillery computer works fine though. Had no luck using the command either. Cheers
  12. Same accuracy as a hand-held M134 I assume... Cheers
  13. Grumpy Old Man

    BM21 Grads not firing on target (CUP)

    Make sure the target is at least 1km away from the grad. Also do a double check and try it with vanilla artillery assets. Cheers
  14. This provides a few cases that can/will happen: Vehicle has been abandoned Vehicle can no longer move (at least 2 tires popped) Vehicle has been destroyed Vehicle crew has been killed Can easily expand from there and handle each case separately if that's what you want: GOM_fnc_vehicleDeleteCheck = { params ["_veh"]; //check if vehicle is destroyed _veh addEventHandler ["Killed",{ systemchat "Vehicle has been destroyed.";//add a respawn script here, or whatever you seem fit }]; //check when no more crewmembers are alive { _x addEventHandler ["Killed",{ params ["_killed"]; if ({alive _x} count units _killed isEqualTo 0) then { systemchat "Crew has no more alive members"; }; }]; } forEach crew _veh; //check if vehicle is still mobile _veh addEventHandler ["Engine",{ params ["_veh", "_engineState"]; if (!_engineState and alive _veh) then { systemchat "Engine turned off, checking if vehicle can still move."; if (!canMove _veh) then { systemchat "Vehicle can no longer move!"; }; }; }]; //check if vehicle has been abandoned _veh addEventHandler ["GetOut",{ params ["_veh", "_role", "_unit", "_turret"]; if (alive _veh AND count crew _veh isEqualTo 0) then { systemchat "Vehicle has been abandoned!"; }; }] }; [MyVehicle] call GOM_fnc_vehicleDeleteCheck; Cheers
  15. Grumpy Old Man

    function spawn error

    Are you by any chance calling some of those functions from object init fields inside the editor? Object init fields are handled before init.sqf/initServer.sqf, so that might be causing your issue. Have a read. Cheers
  16. No idea either, hand grenades and smoke grenades seem to return proper values. Handguns as well. Maybe post in the scripting thread on the devbranch forum, a dev might chime in. Edit: Played around with it, it only returns 1 for primary weapon magazines if the magazine is currently loaded in the primary weapon. So it's not according to wiki which type of weapon the magazine belongs to. Kinda misleading, doubt this is intended. Go figure. Cheers
  17. That's not how copyright works. If you make a painting, you're the copyright owner of it, not the manufacturer of the brush that was used to create the painting. Unless your company is seated in a third world country I guess. The fact that you use and monetize content of others, without giving credit to them, in a way not visible without debinarizing stuff doesn't really put you in a good light. Especially since you goof around words and accuse others of "getting upset", when in reality you got caught red handed. On a sidenote, anyone who's buying stuff from webpages where there's no legitimate phone number or address to be found has it coming. Cheers
  18. Who are you again? Cheers
  19. Grumpy Old Man

    Dirty Respirators

    First thing that crossed my mind, hilarious. @EO Neat masks, very well done. Cheers
  20. Grumpy Old Man

    General Discussion (dev branch)

    Funny enough, the example in the video below does no longer work on current devbranch, might be related: There's a Cheetah stationed on the southern part of the map, on top of a hill, radar active, sending via data link. The SAM sitting on the northern part of the map, 10km away from the target chopper. Somehow the remote targets got messed up, the SAM system never receives target information, despite the chopper being listed using listRemoteTargets west and the Cheetah having a target knowledge of 4. Nothing happens, not even after 2 minutes have passed. Cheers
  21. Grumpy Old Man

    Pickpocket

    Sure, take EH: Cheers
  22. Grumpy Old Man

    Pickpocket

    The answer is right on the wiki, simply use the action instead: player action ["Gear", enemyUnit]; You have to be within 5m of the unit so the inventory stays open. Cheers
  23. GOM_fnc_foggyBreath V1.2 Purpose of this script: Adds authentic visible breath for missions taking place in colder climates. Features: Adds effect to all units (players and AI) in mission, also works for units being spawned mid mission. Visible Breath below 8°C, getting more prominent the lower the temperature, maximum reached at -9°C You can determine the current mission temperature by defining a global variable Units getting hit/injured will exhale, resulting in visible breath Breath frequency increases depending on fatigue, slowly returns to initial frequency when unit catches its breath How to use this script: Copy all files and folders except mission.sqm from the demo mission inside your own mission. Backup all of your files before overwriting anything! The script runs on its own, nothing else needed besides setting the temperature as mentioned below: Files: description.ext: scripts\GOM\foggyBreath\GOM_fnc_foggyBreathInit.sqf: scripts\GOM\foggyBreath\GOM_fnc_foggyBreath.hpp: Updates: Options: GOM_fnc_temperature = -9; This will set the temperature to -9°C, giving the maximum effect. At +8°C the fog will stop. Decided to do it this way so you can give every unit an individual temperature, so if a unit is on top of a mountain it will obviously have a colder temperature than a unit near the beach. Download GOM_fnc_foggyBreath V1.2 Demo Mission Changelog: V1.2: Fog is now more influenced by wind, also helicopter downwash etc Is less prominent at higher temperatures Fog now also works for unit in open vehicles Fog will stop once in a closed vehicle/inside a building Known Issues: None so far. Enjoy!
  24. Grumpy Old Man

    [Release] GOM_fnc_foggyBreath V1.2

    Yeah, I get that. Still a weird error, since the script exits at various points if _unit doesn't exist. Spawned and deleted multiple units with the script being active, never received that error. Cheers
  25. Grumpy Old Man

    [Release] GOM_fnc_foggyBreath V1.2

    Weird, couldn't reproduce it. Well reworked it anyway, added some checks so it shouldn't pop up again. Changelog: V1.2: Fog is now more influenced by wind, also helicopter downwash etc Is less prominent at higher temperatures Fog now also works for unit in open vehicles Fog will stop once in a closed vehicle/inside a building Cheers
×