Jump to content

Right mouse click Call EVAC Heli


Recommended Posts

i want to run this script  but i don't want the scroll wheel menu. i want the scroll wheel for just settting up the evac heli, and remove and all that.

but to call the evac heli i want the player to be able to right mouse. and i want to use it with this /index.php?/topic/4834-add-right-click-options-to-items/">http://epochmod.com/forum/index.php?/topic/4834-add-right-click-options-to-items/

which is to add right mouse options

Link to comment
Share on other sites

I hope OtterNas3 doesn't mind. All credit goes to him. I just modified it :)

 

Anyway here you go...extract it to your mission folder: https://dl.dropboxusercontent.com/u/14937351/ClickableJAEM.zip

 

By default you can call evac chopper by right-clicking the radio. You can change the item in extra_rc.hpp.

 

Installation:

 

1) Open MPMission's init.sqf and place this at the end of the !isDedicated block:

_nil = [] execVM "custom\JAEM\EvacChopper_init.sqf";

2a) If you have followed maca's clickable item tutorial already you need to change your extra_rc.hpp. And do not use ui_selectSlot.sqf and extra_rc.hpp from this zip.

 

2b) If not change this in your custom compiles:

        player_selectSlot = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\ui_selectSlot.sqf";

to

	player_selectSlot =			compile preprocessFileLineNumbers "custom\ui_selectSlot.sqf";

Open your description.ext and add this to the end:

#include "custom\extra_rc.hpp"

3a) If you have custom variables.sqf, open it and add "HeliHRescue" to your dayz_allowedObjects. ie is variables.sqf copied from dayz_code.pbo:

dayz_allowedObjects = ["TentStorage","TentStorageDomed","TentStorageDomed2", "VaultStorageLocked", "Hedgehog_DZ", "Sandbag1_DZ","BagFenceRound_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Land_HBarrier3_DZ","Land_HBarrier5_DZ","Fence_corrugated_DZ","M240Nest_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","Plastic_Pole_EP1_DZ","Generator_DZ","StickFence_DZ","LightPole_DZ","FuelPump_DZ","DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ","SandNest_DZ","DeerStand_DZ","MetalPanel_DZ","WorkBench_DZ","WoodFloor_DZ","WoodLargeWall_DZ","WoodLargeWallDoor_DZ","WoodLargeWallWin_DZ","WoodSmallWall_DZ","WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","LockboxStorageLocked","WoodFloorHalf_DZ","WoodFloorQuarter_DZ","WoodStairs_DZ","WoodStairsSans_DZ","WoodStairsRails_DZ","WoodSmallWallThird_DZ","WoodLadder_DZ","Land_DZE_GarageWoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_WoodDoor","Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallHalf_DZ","CinderWall_DZ","CinderWallDoorway_DZ","CinderWallDoor_DZ","CinderWallDoorLocked_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorSmall_DZ","CinderWallDoorSmallLocked_DZ","MetalFloor_DZ","WoodRamp_DZ","GunRack_DZ","FireBarrel_DZ","WoodCrate_DZ","Scaffolding_DZ"];

to:

dayz_allowedObjects = ["TentStorage","TentStorageDomed","TentStorageDomed2", "VaultStorageLocked", "Hedgehog_DZ", "Sandbag1_DZ","BagFenceRound_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Land_HBarrier3_DZ","Land_HBarrier5_DZ","Fence_corrugated_DZ","M240Nest_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","Plastic_Pole_EP1_DZ","Generator_DZ","StickFence_DZ","LightPole_DZ","FuelPump_DZ","DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ","SandNest_DZ","DeerStand_DZ","MetalPanel_DZ","WorkBench_DZ","WoodFloor_DZ","WoodLargeWall_DZ","WoodLargeWallDoor_DZ","WoodLargeWallWin_DZ","WoodSmallWall_DZ","WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","LockboxStorageLocked","WoodFloorHalf_DZ","WoodFloorQuarter_DZ","WoodStairs_DZ","WoodStairsSans_DZ","WoodStairsRails_DZ","WoodSmallWallThird_DZ","WoodLadder_DZ","Land_DZE_GarageWoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_WoodDoor","Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallHalf_DZ","CinderWall_DZ","CinderWallDoorway_DZ","CinderWallDoor_DZ","CinderWallDoorLocked_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorSmall_DZ","CinderWallDoorSmallLocked_DZ","MetalFloor_DZ","WoodRamp_DZ","GunRack_DZ","FireBarrel_DZ","WoodCrate_DZ","Scaffolding_DZ","HeliHRescue"];

3b) If you do not have a custom variables.sqf lets create one.

Open your MPMissions\...mission folder...\custom and create a new blank file called variables.sqf

Paste this code into it:

dayz_allowedObjects = dayz_allowedObjects + ["HeliHRescue"];

Open your mpmission init.sqf and right after line:

call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf";

add this line:

call compile preprocessFileLineNumbers "custom\variables.sqf";

4) Go to your BE filters and open these files:

remoteexec.txt

waypointcondition.txt

waypointstatement.txt

 

Add this to the end of the 2'nd line (first is //new) in all those 3 files. Do not insert a line break before it:

 !"\["true", ""\]"

And you are done :)

 

 

This is for epoch 1.0.4.2 as is. If the ui_selectSlot.sqf is not compatible with your version of epoch or JAEM gets updated then its up to you to update the script.

Link to comment
Share on other sites

I hope OtterNas3 doesn't mind.

Anyway here you go...extract it to your mission folder: https://dl.dropboxusercontent.com/u/14937351/ClickableJAEM.zip

 

By default you can call evac chopper by right-clicking the radio. You can change the item in extra_rc.hpp.

 

Installation:

 

Open MPMission's init.sqf and place this at the end of the !isDedicated block:

_nil = [] execVM "custom\JAEM\EvacChopper_init.sqf";

If you have followed maca's clickable item tutorial already you need to change your extra_rc.hpp. And do not use ui_selectSlot.sqf and extra_rc.hpp from this zip.

 

If not change this in your custom compiles:

	player_selectSlot =			compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\ui_selectSlot.sqf";

to

	player_selectSlot =			compile preprocessFileLineNumbers "custom\ui_selectSlot.sqf";

And open your description.ext and add this to the end:

#include "custom\extra_rc.hpp"

This is for epoch 1.0.4.2 as is. If the ui_selectSlot.sqf is not compatible with your version of epoch or JAEM gets updated then its up to you to update the script.

Link to comment
Share on other sites

I hope OtterNas3 doesn't mind.

Anyway here you go...extract it to your mission folder: https://dl.dropboxusercontent.com/u/14937351/ClickableJAEM.zip

 

By default you can call evac chopper by right-clicking the radio. You can change the item in extra_rc.hpp.

 

Installation:

 

Open MPMission's init.sqf and place this at the end of the !isDedicated block:

_nil = [] execVM "custom\JAEM\EvacChopper_init.sqf";

If you have followed maca's clickable item tutorial already you need to change your extra_rc.hpp. And do not use ui_selectSlot.sqf and extra_rc.hpp from this zip.

 

If not change this in your custom compiles:

	player_selectSlot =			compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\ui_selectSlot.sqf";

to

	player_selectSlot =			compile preprocessFileLineNumbers "custom\ui_selectSlot.sqf";

And open your description.ext and add this to the end:

#include "custom\extra_rc.hpp"

This is for epoch 1.0.4.2 as is. If the ui_selectSlot.sqf is not compatible with your version of epoch or JAEM gets updated then its up to you to update the script.

Link to comment
Share on other sites

For the debug monitor, just move the script execution to !isDedicated part of init.sqf in your MPMissions.

 

As for the JAEM, the set up is the same as original. Go to heli and you get the scroll option. I thaught it would be best to leave it that way.

Link to comment
Share on other sites

1) You can ignore these rpt errors.

 

2) I can't see anything wrong with that script. Try to remove it and see if it causes the problems or maybe you have some messed up custom mission loot added?

 

3) Take your questions here: http://epochmod.com/forum/index.php?/forum/35-scripting-help/ :)

 

hey man thank you for the help, also the debug monitor works fine now. also nearly all of the errors went away after i removed the castle script. also im using the 4 side missions and wickedAI, i edited the 4 side missions to include some items as well as some briefcases in the weapon boxes they spawn, im not sure if thats the problem.

Link to comment
Share on other sites

1) You can ignore these rpt errors.

 

2) I can't see anything wrong with that script. Try to remove it and see if it causes the problems or maybe you have some messed up custom mission loot added?

 

3) Take your questions here: http://epochmod.com/forum/index.php?/forum/35-scripting-help/ :)

hey man i just got 2 more question, im sure there is a easy fix for this.

my first problem is that when some players get into the side turrents of helicopters they cannot aim. the guns crosshair is aimed toward the front of the helicopter and they cant look around by pressing alt.

another is that every time someone join they have to keep downloading the mission files but on other server after you join once and go back to the lobby after you die, you dont have to download the mission files but on my server everytime you die and you go back to the lobby you have to download the mission files.

please help.

Link to comment
Share on other sites

The set evac chopper thing doesn't work for me. It took the briefcases, started building the pad, then the pad disappeared but the guy was still building. After he is done, it says finished, but I cannot call the evac chopper it says *There is no evac chopper on your evac field*

Any help?

Link to comment
Share on other sites

Show me your extra_rc.hpp.

Also describe your problem a bit more. What towing script are you using? What happens when you try to tow? Any rpt errors?

Well the tow lift is working apparently....was just bad report from a player.  Self bloodbag is not though.  Here is the file....it's just what was posted here:

 

class ExtraRc {
class ItemRadio {
class CallChopper {
            text = "Call Evac-Chopper";
            script = "execVM 'custom\JAEM\CallEvacChopper.sqf'";
};
};
};
Link to comment
Share on other sites

That file should include all the classes you wish to make clickable.

So I am assuming you use my right-click self BB. Your file should look like this:

class ExtraRc {
	class ItemBloodbag {
		class Use {
            text = "Use Bloodbag";
            script = "execVM 'custom\SelfBB.sqf'";
		};
	};
	class ItemRadio {
		class CallChopper {
            text = "Call Evac-Chopper";
            script = "execVM 'custom\JAEM\CallEvacChopper.sqf'";
		};
	};
};
Link to comment
Share on other sites

 

That file should include all the classes you wish to make clickable.

So I am assuming you use my right-click self BB. Your file should look like this:

class ExtraRc {
	class ItemBloodbag {
		class Use {
            text = "Use Bloodbag";
            script = "execVM 'custom\SelfBB.sqf'";
		};
	};
	class ItemRadio {
		class CallChopper {
            text = "Call Evac-Chopper";
            script = "execVM 'custom\JAEM\CallEvacChopper.sqf'";
		};
	};
};

Ahh...was thinking that may be the case.  Sweet, thanks much for the help and again for the great scripts.

Link to comment
Share on other sites

You modified the original 1.3 Evac Chopper files? Have you fixed the issues reported at the original thread already or will there be the same issues? I really would give it a try but after updating to 1.3 nothing worked fine and we had a serverdowntime from about 1 hour to downgrade the Evaccopper.

Link to comment
Share on other sites

I gave it a chance and it failed :(

 

It works good as long as I won´t change the Evac-Chopper field. When I do so the first one stays and another one appears. After this the script breaks down because there are two field´s with one UID.

Uh didn't test this...try this setEvacChopper.init: Updated first post!

You may need to delete the extra field manually, but it shouldn't happen anymore.

 

If you run into similar problems please let me know :)

Link to comment
Share on other sites

Unfortunatly this doesn´t work too. Now the script stucks after

 

"WARNING! Changing Evac .... 5sec!"

...

"WARNING! Changing Evac .... 1sec!"

 

And nothing happens. The old field is already there but there is no new one.

 

I really would like to help and find the error, but I´m new to the hole scripting thing.

 

PS: I´ve deleted the old fields out of the database and set up a new one.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...