Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
the script i'm trying to implement is as follows:
this call {
if (isServer) then {
_this lockTurret [[0], true];
_this lockTurret [[0,0], true];
_this lockCargo true;
_this addMPEventHandler ["MPKilled", {
if (isServer) then {
_d = driver (_this select 0);
_g = gunner (_this select 0);
if (!isNull _d) then {deleteVehicle _d};
if (!isNull _g) then {_g setDamage 1};
};
}];
};
if (!isDedicated) then {
_this addEventHandler ["GetIn", {
enableSentences false;
_tank = _this select 0;
_unit = _this select 2;
_unit allowDamage false;
_unit action ["EngineOn", _tank];
_unit action ["MoveToGunner", _tank];
_tank lock true;
_tank switchCamera "EXTERNAL";
_tank addAction [localize "str_action_getout", {
_this select 0 removeAction (_this select 2);
_this select 1 action ["GetOut", _this select 0];
}, "", 3, false, true, "GetOver"];
_tank spawn {
waitUntil {!isNull gunner _this};
_ai = createAgent [
typeOf gunner _this, [0,0,0], [], 0, "NONE"
];
_ai allowDamage false;
_ai moveInDriver _this;
};
}];
_this addEventHandler ["GetOut", {
_tank = _this select 0;
_unit = _this select 2;
deleteVehicle driver _tank;
_unit allowDamage true;
_unit action ["EngineOff", _tank];
_tank lock false;
enableSentences true;
}];
};
};
It's mean to for players to 1 man crew a tank but i'm unable to get the respawn to execute the sqf file, is there something i'm missing?
A tank with an AI crew and human commander/gunner works fine, so long as the player is the group leader. You can drive the tank using WASD while controlling the gun with your mouse -- there's no need for a one-man-tank script. The only downside to this method is you'll have to hear "LEFT, RIGHT, FORWARD" voice lines from your player's, but I've learned to ignore them lol.
If you don't want AI group members, then the best alternative is MGI's "One Man Tank" module (link below). Place it on the map and then hop into the gunner's seat; you're good to go. I've used it in the past and it works great. Downside is you can't switch to driver or commander seat, which means you can't pop smoke countermeasures. Also you can't have other human players in your tank as they get kicked out immediately.
https://steamcommunity.com/sharedfiles/filedetails/?id=1682280809
Good luck with your mission making!