shurix Posted February 26, 2015 Report Share Posted February 26, 2015 On Altis, when I drive up to a Gas Station, my vehicle is automatically getting refueled. Any way to turn this off? I want to start wars for fuel on my server... Link to comment Share on other sites More sharing options...
maddingamer Posted February 26, 2015 Report Share Posted February 26, 2015 I know it is possible. I saw it on an AlitsLife server some time ago...But dunno how to script that, sry. Link to comment Share on other sites More sharing options...
KiloSwiss Posted February 26, 2015 Report Share Posted February 26, 2015 Should be possible by using setFuelCargo on each gas station object on the Island. Greez KiloSwiss Link to comment Share on other sites More sharing options...
shurix Posted February 26, 2015 Author Report Share Posted February 26, 2015 This doesn't work for me when running from mission init file if (isServer) then { systemChat(format["Start looking for Gas Stations"]); { _x setFuelCargo 0; } forEach (nearestObjects [getMarkerPos "center", ["Land_fs_feed_F"], 10000]); systemChat(format["Finished looking for Gas Stations"]); }; Link to comment Share on other sites More sharing options...
KiloSwiss Posted February 26, 2015 Report Share Posted February 26, 2015 Do not use such a wide search radius (it should give you a warning, written into the .rpt logfile)! Better create multiple game logic objects and search only for near objects by their ID. Here is a small example mission for altis (also works for Stratis).http://kiloswiss.ch/misc/arma3/nofuel.Altis.zip And here is the "how to": - Unpack the mission folder (noFuel.altis) from the .zip file. - Place the mission folder into "C:\Users\#######\Documents\Arma 3 - Other Profiles\#######\missions\" (Path for x64 Windows) - Open the mission in the mission editor and klick on preview (test the example fuelstation with the two vehicles, they will not refill their gas). - Follow the instructions in the upper right corner. - Once you see the ID, go back to the editor view. - Make a copy of the gamelogic, place it near the next gas station You want to remove the fuel (also place the player there) and klick on preview. - Follow the instructions again and again, go back to the editor view. - Then double klick on the gamelogic and replace the ID (use CTRL+V) inside the gamelogics init field with the new one (overwrite the number "814400" between the square brackets []). - Rinse and repeat until You have a gamelogic with the correct ID (or multiple IDs*) near every single fuel station You want to have all gas removed.Now to the tricky part: - Remove the vehicles, safe and load the default mission.sqm from Your mission file (epoch.<island>.pbo) **. - Now merge the mission with the gameLogics into your epoch mission. - IMPORTANT: Remove the playable unit, save the mission, move it back into your mission file and have fun.* If You want to add multiple IDs because the fuel station has more than one feed, the init of the gamelogic should look like this: if(true)then{this spawn{{((getPos _this) nearestObject _x) setFuelCargo 0}count [814400,987654,112233]; deleteVehicle _this}}; ** Create a new folder where the noFuel.altis mission is located, name it something.Altis, move your mission.sqm into this folder and You will be able to load it in the editor under the name of the folder you created. Greez KiloSwiss Link to comment Share on other sites More sharing options...
shurix Posted February 26, 2015 Author Report Share Posted February 26, 2015 This seems to work for me: if (isServer) then { _fuelPump_locations = [ [9205.75,12112.2,-0.0487213], [11831.6,14155.9,-0.0342026], [12024.7,15830,-0.0298138], [12026.6,15830.1,-0.0342979], [12028.4,15830,-0.0388718], [9025.78,15729.4,-0.0206451], [9023.75,15729,-0.027153], [9021.82,15728.7,-0.0293427], [16750.9,12513.1,-0.0525188], [6798.15,15561.6,-0.0441475], [6198.83,15081.4,-0.0912437], [14181.6,16549.3,0.00917625], [5023.26,14429.6,-0.0978947], [5019.68,14436.7,-0.0114822], [4001.12,12592.1,-0.0966644], [17417.2,13936.7,-0.10652], [3757.14,13477.9,-0.0540285], [3757.54,13485.9,-0.010498], [16875.2,15469.4,0.0373325], [16871.7,15476.6,0.0102873], [8481.69,18260.7,-0.0266876], [15297.1,17565.9,-0.2838], [14221.4,18302.5,-0.0697174], [15781,17453.2,-0.285282], [19961.3,11454.6,-0.0349312], [19965.1,11447.6,-0.0483704], [5768.99,20085.7,-0.0189667], [21230.4,7116.56,-0.0604248], [20784.8,16665.9,-0.0521202], [20789.6,16672.3,-0.0213318], [23379.4,19799,-0.0544052], [25701.2,21372.6,-0.0774155] ]; systemChat(format["Start looking for Gas Stations"]); { _fuelFeeds = nearestObjects [_x, ["Land_fs_feed_F"], 10]; { _x setFuelCargo 0; } forEach _fuelFeeds; } forEach _fuelPump_locations; //{ _x setFuelCargo 0; } forEach (nearestObjects [getMarkerPos "center", ["Land_fs_feed_F"], 10000]); systemChat(format["Finished looking for Gas Stations"]); }; Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now