Forum Jump :

Author Message


Posts: 3
Rank:


Level: Member

Country: hu
Location:
Occupation: 3D artist / sculpture
Age: 27
In-game name:

 
#1 Posted at 2014-10-23 22:26        
     
Hello!

I m making a mp mission, where the player starts in a flying helicopter, as a cargo. The heli has ammo and weapon that refills and it's flying around. The player has to eject from the heli, land and start the mission. But i have some questions.

this addEventHandler ["HandleDamage", {false}]; <-is this working in multiplayer? or any other method to keep the heli and the pilot alive?

I find it easy to respawn in arma 3, but how to respawn inside a vehicle? for example, The player dies on the ground then respwans as a cargo inside the uh80(delta force joint operation style).

How to make npc fly in a given elevation? so move-move-move-cycle, but above 500 meter, and make him not to react to ground fire?

THX


Author Message

Tajin  



Posts: 433
Rank:


Level: Member

Country: de
Location: Bavaria
Occupation: Communications Designer
Age: 33
In-game name: Tajin

 
#2 Posted at 2014-10-24 09:11        
     
You could use an eventhandler for that or simply place your respawn inside a trigger area that moves everyone who enters the trigger into the heli.

Oh and you can simply use
this allowDamage false; (driver this) allowDamage false;
in the init of your heli.


Alternately, use setCaptive on the heli so it doesn't get shot at in the first place.

There are a lot of very capable people on this forum, willing to spend some of their time to help you out. So if you have a problem, it surely isn't too much to ask that you atleast take the time to describe it properly. Thanks.

Advertisement


Author Message


Posts: 69
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age: 23
In-game name: Mr. Ryan

 
#3 Posted at 2014-10-24 15:40        
     
As for the respawn in vehicle, if it's only a short distance then you could create a script called 'OnPlayerRespawn.sqf' (fires automatically on respawning).

So in that put something like;

player assignAsCargo heli1;
player moveInCargo heli1;

If I've helped you out, or you like my missions, consider donating, however small :-) PayPal Donations. Or check out My Wordpress Site for my content!

Author Message


Posts: 3
Rank:


Level: Member

Country: hu
Location:
Occupation: 3D artist / sculpture
Age: 27
In-game name:

 
#4 Posted at 2014-10-25 00:57        
     
Okay THX :) update.

respawn works, i respawn with the correct init, and inside the helicopter.
But the helicopter cant refill it's inventory. this is the text i use, i found it here, only it
said "_crate" instead of heli.
init of the heli


nul =[this] execVM "ammo_box.sqf";



sqf file


if (! isServer) exitWith {};

heli = _this select 0;




while {alive heli} do
{


clearMagazineCargo heli;
clearWeaponCargo heli;
clearItemCargoGlobal heli;
///NATO Weapons///


heli addWeaponCargoGlobal ["arifle_MX_F", 2];
heli addWeaponCargoGlobal ["arifle_MX_GL_F", 2];
heli addWeaponCargoGlobal ["arifle_MXC_F", 2];
heli addweaponcargoglobal ["SMG_01_F", 2];


heli addMagazineCargoGlobal ["30Rnd_65x39_caseless_mag_Tracer", 30];
heli addMagazineCargoGlobal ["100Rnd_65x39_caseless_mag_Tracer", 30];
heli addmagazinecargoglobal ["30Rnd_45ACP_Mag_SMG_01", 30];

heli addMagazineCargoGlobal ["1Rnd_HE_Grenade_shell", 10];
heli addMagazineCargoGlobal ["1Rnd_Smoke_Grenade_shell", 3];
heli addMagazineCargoGlobal ["1Rnd_SmokeGreen_Grenade_shell", 3];
heli addMagazineCargoGlobal ["1Rnd_SmokeYellow_Grenade_shell", 3];

heli addItemCargoGlobal ["optic_Arco", 2]; 
heli addItemCargoGlobal ["optic_Hamr", 2]; 
heli addItemCargoGlobal ["optic_Aco", 2]; 
heli addItemCargoGlobal ["optic_ACO_grn",2]; 
heli addItemCargoGlobal ["optic_Holosight", 2]; 

heli additemcargoGlobal ["ItemGPS", 2];
heli addItemCargoGlobal ["FirstAidKit", 20];




sleep 30;
};


update,
I works, i had to delet and make the sqf file again.

This post was edited by IketaniKun (2014-10-25 09:00, 1088 days ago)


Author Message


Posts: 69
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age: 23
In-game name: Mr. Ryan

 
#5 Posted at 2014-10-25 18:27        
     
Good to hear you've fixed it :)

If I've helped you out, or you like my missions, consider donating, however small :-) PayPal Donations. Or check out My Wordpress Site for my content!