Jump to content

Search the Community

Showing results for tags 'remove'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • BOHEMIA INTERACTIVE
    • BOHEMIA INTERACTIVE - NEWS
    • BOHEMIA INTERACTIVE - JOBS
    • BOHEMIA INTERACTIVE - GENERAL
  • FEATURED GAMES
    • Vigor
    • DAYZ
    • ARMA 3
    • ARMA 2
    • YLANDS
  • MOBILE GAMES
    • ARMA MOBILE OPS
    • MINIDAYZ
    • ARMA TACTICS
    • ARMA 2 FIRING RANGE
  • BI MILITARY GAMES FORUMS
  • BOHEMIA INCUBATOR
    • PROJECT LUCIE
  • OTHER BOHEMIA GAMES
    • ARGO
    • TAKE ON MARS
    • TAKE ON HELICOPTERS
    • CARRIER COMMAND: GAEA MISSION
    • ARMA: ARMED ASSAULT / COMBAT OPERATIONS
    • ARMA: COLD WAR ASSAULT / OPERATION FLASHPOINT
    • IRON FRONT: LIBERATION 1944
    • BACK CATALOGUE
  • OFFTOPIC
    • OFFTOPIC
  • Die Hard OFP Lovers' Club's Topics
  • ArmA Toolmakers's Releases
  • ArmA Toolmakers's General
  • Japan in Arma's Topics
  • Arma 3 Photography Club's Discussions
  • The Order Of the Wolfs- Unit's Topics
  • 4th Infantry Brigade's Recruitment
  • 11th Marine Expeditionary Unit OFFICIAL | 11th MEU(SOC)'s 11th MEU(SOC) Recruitment Status - OPEN
  • Legion latina semper fi's New Server Legion latina next wick
  • Legion latina semper fi's https://www.facebook.com/groups/legionlatinasemperfidelis/
  • Legion latina semper fi's Server VPN LEGION LATINA SEMPER FI
  • Team Nederland's Welkom bij ons club
  • Team Nederland's Facebook
  • [H.S.O.] Hellenic Special Operations's Infos
  • BI Forum Ravage Club's Forum Topics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Yahoo


Jabber (xmpp)


Skype


Biography


Twitter


Google+


Youtube


Vimeo


Xfire


Steam url id


Raptr


MySpace


Linkedin


Tumblr


Flickr


XBOX Live


PlayStation PSN


Origin


PlayFire


SoundCloud


Pinterest


Reddit


Twitch.Tv


Ustream.Tv


Duxter


Instagram


Location


Interests


Interests


Occupation

Found 9 results

  1. Im having abit of trouble getting my addactions to remove from list. What I have tried in greeting.sqf //Not the hole sqf file Guard1 addAction ["What do you do here", "Dialog\Guard1\JobDisc.sqf","((_target distance _this) <2"]; in JobDisc.sqf hint "I guard the entrance to Camp Bravo"; Guard1 addaction ["Anything happen lately?", "Dialog\Guard1\EnemyLoitering.sqf"]; Guard1 removeaction "What do you do here"; //this action is added by a different script file. I got a hole convo working with a few scripts like this. Everything works perfectly except for the remove action. I need the previous actions to be removed because if you ask again they add more. this is on a coop/single player mission where you respawn as a squad mate when you die until everyone is dead.
  2. Hi, I know how to add a custom ace 3 interaction by script, but is it possible to remove this action after use? And how?
  3. Hello, I've been playing with Put and Take event handlers to try and achieve functionality that's stated in the topic. For starters Put EH seems to only fire when you drop your weapon on the ground (groundWeaponHolder) or put the weapon into a container (box, vehicle) directly from your inventory. It doesn't fire when switching to a weapon that is on the ground even though (at least how I see it) you are still dropping your current weapon into a "groundWeaponHolder". Does anyone have an idea why this EH doesn't fire in that case? I used this shortie to test Put EH: player addEventHandler ["Put", {_unit = _this select 0; _content = _this select 1; _weapon = _this select 2; hint "This EH seems to be working";}]; Take EH on the other hand seems to work just fine for detecting the weapon pick up operation. But other than testing with simple hint that the EH fires when needed I haven't been able to come up with anything I'm looking to achieve. Now the ultimate question is: by using either of the aforementioned EHs how to delete the weapon that gets put on the ground during weapon switching operation?
  4. Hi all, I'm trying to remove a specific weapon (known by classname) from the cargo. The issue currently is that this seems only to be possible by clearing the complete weapon cargo and adding everything back but the weapon I want to remove. This however leads to issues as all attachements are lost. I found on the wiki the command "removeWeaponCargo", which possible could be used to delete only the weapon in question: https://community.bistudio.com/wiki/removeWeaponCargo. This uses weaponID and creatorID as arguments. Does anyone know what those are, and where I can find them for the given weapon I want to delete?
  5. Overview Clean up all dead, dropped stuff, ruins, craters around desired point or entire map and remove empty groups. You need to define at least one parameter position, marker or object. Parameter(s): 0 (Required): STRING - marker name, or ARRAY - position in format [x,y,z] or OBJECT - trigger or any object 1 (Optional): NUMMBER - Radius for dead stuff search around param 0, if not supplied, 500m will be automatically selected. 2 (Optional): NUMMBER - Min distance from object to any player. Preventing player to see disappearing of the object, if not supplied, 300m will be automatically selected. 3 (Optional): NUMMBER - Vehicle damage above which almost wrecked vehicles without crew will be selected to remove it. If not supplied such vehicles stays in game. Value between 0.1 and 0.9 4 (Optional): BOOLEAN - Ability to handle with empty groups - true/false. If not supplied false will be selected (disabled) 5 (Optional): NUMMBER - Sleep time in sec between search if not defined 5 min will be automatically selected. Returns: Nothing To prevent remove some object you need to set an "dnt_remove_me" variable on it using: this setVariable ["dnt_remove_me",true,false] You can adjust default functionality by passing desired parameters. Can be called for one area, many areas using multiple instances, or for entire map at once. Download Google Drive Armaholic Usage Place the script in mission root/scripts directory. Best method is to compile it into a function specially if more instances needed. Usage is also commented at the top of the file. init.sqf : /*Example for whole map: Constantly search entire map with 10min interval. Objects in player range (100m) will be skipped. Almost wrecked vehicles without crew stays in game. */ if (isServer) then { fnc_cleanup = compileFinal preprocessFileLineNumbers "scripts\cleanup.sqf"; null = [ [worldSize/2,worldSize/2,0], worldSize/2, 100, 1200 ] spawn fnc_cleanup; }; init.sqf : /*Example for marker: Constantly search entire marker area with 5min interval. Objects in player range (300m) will be skipped. */ if (isServer) then { fnc_cleanup = compileFinal preprocessFileLineNumbers "scripts\cleanup.sqf"; null = [ "marker0", ((getMarkerSize "marker0") call BIS_fnc_greatestNum) ] spawn fnc_cleanup; }; init.sqf : /*Example for object: Constantly search entire trigger area with 10min interval. Almost wrecked empty vehicles with damage > 0.8 will be removed. Objects in player range (500m) will be skipped. Empty groups will be removed. */ if (isServer) then { fnc_cleanup = compileFinal preprocessFileLineNumbers "scripts\cleanup.sqf"; null = [ _myTrigger, ((triggerArea _myTrigger) call BIS_fnc_greatestNum), 500, 0.8, true, 1200 ] spawn fnc_cleanup; }; cleanup.sqf Changelog 12/25/15 First release. 01/04/16 Version 1.0 * Possibility to adjust functionality. * You can now define objects to delete and define damage threshold for vehicles. * removing empty groups 02/17/16 Version 1.1 Added : * Set persistence for certain object. 13/01/17 Version 1.2 *Changed usage of BIS_fnc_inTrigger to inAreaArray command *Set lazy evaluation for conditions 03.01.2018 Version 1.3 Changed usage to more user friendly way. Added player in area check Known Issues None knew for now. Legal You are allowed to change what you want in this script.
  6. Preamble: From the wiki, we can use splitstring and joinstring to remove white space from code. So if we have a function like this one (from the wiki): fnc_deleteTestObj = { _this addMPEventHandler ["MPKilled", { _this = _this select 0; { deleteVehicle _x; } forEach (_this getVariable ["effects", []]); if (isServer) then { deleteVehicle _this; }; }]; _this setDamage 1; }; We can do: copyToClipboard(([fnc_deleteTestObj] joinString "") splitString toString [9,13,10] joinString "") and it returns: { _this addMPEventHandler ["MPKilled", { _this = _this select 0; { deleteVehicle _x; } forEach (_this getVariable ["effects", []]); if (isServer) then { deleteVehicle _this; }; }]; _this setDamage 1; } Which is quite nice. But I wanted a way to remove as much white space as I can (for sending code/variables over the network etc), plus I just fancied playing about with recursion. So with this function, we can use our "fnc_deleteTestObj" function again and plug it in: copyToClipboard(([fnc_deleteTestObj] joinString "") call fnc_whitespace) This returns: {_this addMPEventHandler["MPKilled",{_this=_this select 0;{deleteVehicle _x;}forEach(_this getVariable["effects",[]]);if(isServer)then{deleteVehicle _this;};}];_this setDamage 1;} I'm using joinstring in these examples as opposed to format as it doesn't have the 8k limit. Apparently formatText isn't limited and I'm not sure about str. But you could do this I suppose - just be aware it might have a limit: (str fnc_deleteTestObj) call fnc_whitespace Uses As mentioned, you could shorten variables prior to sending them over the network (then compileFinal at other end). I'm aware that programs like these exist already, but I wanted to do it in sqf (like within the engine). It should be ok but will have a problem if you do silly things like putting spaces into variables ex: player setVariable ["there are spaces in this",true]; which is a bit of a no-no imo and bad practice. You could probably obfuscate your code with this if you want but there are already good online obfuscators available anyway, and also good online de-obfuscators, like this one: http://unminify.com/ I think Dwarden said he used to do this to his mission files to make them smaller so they wouldn't suck up as much bandwidth, so theres a use for it there I suppose. Obv, I haven't tested this much but it seems ok so far - ymmv. Be aware if you use it on very large functions, then it is recursive so it might freeze your game for a few seconds. If you rename it, make sure you rename the call to it in the code as well or you will break it. Function: Here it is for any interested: fnc_whitespace = { private _noWhitespace = toArray(_this); private _anyWS = false; { if (0 isEqualType _x) then { if ([9,13,10] find _x > -1) then { _noWhitespace set [_forEachIndex,objNull]; _anyWS = true; } else { if ([34,39,94,42,40,41,123,125,91,93,59,58,62,47,43,45,61,46] find _x > -1) then { if (_forEachIndex - 1 > -1) then { if ([32,9,13,10] find (_noWhitespace select (_forEachIndex - 1)) > -1) then { _noWhitespace set [_forEachIndex - 1,objNull]; _anyWS = true; } }; if (_forEachIndex + 1 < count _noWhitespace) then { if ([32,9,13,10] find (_noWhitespace select (_forEachIndex + 1)) > -1) then { _noWhitespace set [_forEachIndex + 1,objNull]; _anyWS = true; } }; } } }; } forEach _noWhitespace; _noWhitespace = _noWhitespace - [objNull]; if (_anyWS) then { _noWhitespace = (toString _noWhitespace) call fnc_whitespace; _noWhitespace = toArray _noWhitespace; }; toString(_noWhitespace) }; And here it is compacted (ho ho ho): fnc_whitespace={private _noWhitespace=toArray(_this);private _anyWS=false;{if(0 isEqualType _x)then{if([9,13,10]find _x>-1)then{_noWhitespace set[_forEachIndex,objNull];_anyWS=true;}else{if([34,39,94,42,40,41,123,125,91,93,59,58,62,47,43,45,61,46]find _x>-1)then{if(_forEachIndex-1>-1)then{if([32,9,13,10]find(_noWhitespace select(_forEachIndex-1))>-1)then{_noWhitespace set[_forEachIndex-1,objNull];_anyWS=true;}};if(_forEachIndex+1 < count _noWhitespace)then{if([32,9,13,10]find(_noWhitespace select(_forEachIndex+1))>-1)then{_noWhitespace set[_forEachIndex+1,objNull];_anyWS=true;}};}}};}forEach _noWhitespace;_noWhitespace=_noWhitespace-[objNull];if(_anyWS)then{_noWhitespace=(toString _noWhitespace)call fnc_whitespace;_noWhitespace=toArray _noWhitespace;};toString(_noWhitespace)} Credit to @dreadedentity for his initial code HERE Enjoy!
  7. Hi, I am just wondering on how to remove map objects in the Eden editor when not loaded in as a player, but in the editor screen when you can place objects. I have seen screen shots where when they are placing objects there is clear spaces where they have done something to remove them map placed objects. I'm just wondering how this is possible? Cheers!
  8. When a jet crashes on a runway for example, it creates this weird dirt/crater which makes landing impossible. I know how to remove the jet but how can i prevent that dirt from appearing? Sa-matra figured out how to do it appearently as such dirt does not create in king of the hill.
  9. fn_arrayValues.sqf - v1.2 What? This script gives you the possibility to get, set, add and remove elements from and in an array by using unique IDs (strings) for each array element without having to worry about indexes. The logic behind it is totally simple. Why? TL;DR: I don't know if some people already created and use something like this, but either way, it's useful and took less than an hour to write. Slightly longer version: While developing some multiplayer missions now and then, I was moving data back and forth between client and server, sometimes using relatively large arrays. At some point, I found it annoying having to be careful about what value is at which index and when I somehow change the array, I had to double check again if the correct indexes are read and written. Coming from object-oriented programming languages, I always found it not satisfactory being unable to create custom objects in SQF. I know there is a „pseudo OO“ framework by code34, but that's just too heavy for my needs. All I wanted was being able to have one thing where I can get, set, add and remove values without having to care about anything but identifiers, just like the getters and setters in an object. And that's the idea of this script. How? This script MUST NOT be spawned, because it's got return values (no shit! ;)). Be aware of that when using remote execution. Every ID has to be a string and can only exist once throughout the whole array. Parameters and which are optional (or not) is described in the top of the script so I'll leave that out here. Examples: All examples are assuming “someId†exists, except if mentioned differently. //Creating a new array of this kind: _array = [[], []]; //Getting a value: _value = [_array, "someId"] call fnc_arrayValue; //Setting a value: _array = [_array, "someId", 123] call fnc_arrayValue; //Adding a value (assuming “someId†does not exist): _array = [_array, "someId", 123, true] call fnc_arrayValue; //Removing a value: _array = [_array, "someId", nil, false] call fnc_arrayValue; //Removing a value, only if it is 3: _array = [_array, "someId", 3, false] call fnc_arrayValue; //Setting a value explicitly to nil, instead of removing it from the array: _array = [_array, "someId", nil, true] call fnc_arrayValue; Kudos to Killzone_Kid for his SQF to BBCode Converter. It doesn't matter how much the array changes. You'll always get the desired value behind the same ID, independent from which index it currently has got. Unfortunately, last time I checked, SQF does not allow arrays like this: [123, , true] which is why there has to be a value (e.g. nil) even if you want to delete something from the array. If you did not pass the “isAdd†parameter, hence accidently try to set a value for an ID which does not exist, for instance due to a typo, the value won't be set. Some might consider it a feature if it would, some might not. I personally like my scripts in a way that only very few things happen implicitly, but I'd like to know what you think about that. Download the file here (SpiderOak)
×