Welcome to the Iron Front Fan Forums!
Sign up Latest Topics
 
 
 


Reply
  Author   Comment   Page 3 of 3      Prev   1   2   3
Joarius

Avatar / Picture

IFR Team
Registered:
Posts: 290
Reply with quote  #31 
13 - How lock tanks for infantrymen, but not for Tank crew or for SPG crew ?
One member of my team has given me a script allowing to lock tank. But it locks tanks only for one classlist (by example LIB_GER_tank_crew).

SCRIPT Vehicle_Equipage_Filtrage.sqf :
_vehicleType = _this select 0;        // "Helicopter" / "Tank"
_crew = _this select 1;                // "LIB_GER_tank_lieutenant" / "LIB_GER_tank_unterofficer" / "LIB_GER_tank_crew" / "LIB_GER_spg_lieutenant" / "LIB_GER_spg_unterofficer" / "LIB_GER_spg_crew"

    // hint format["%1 - %2",_crewType, _vehicleType];
  if (typeof player != _crew) then {
    private "_v";
    while {alive player} do {
      waituntil {vehicle player != player};
      _v = vehicle player;
      if (_v iskindof _vehicleType && !(_v iskindof "ParachuteBase")) then {
        if (driver _v == player) then {
          player action ["eject",_v];
          waituntil {vehicle player == player};
          hint "Vous n'êtes pas autorisé à utiliser ce véhicule.";
        };
      };
    };
  };

init.sqf :
["Tank","LIB_GER_tank_crew"] execVM "scripts\Vehicle_Equipage_Filtrage.sqf";


I have tried to repeat the command for the script in init.sqf, with each classlist wanted, but it doesn't work.
["Tank","LIB_GER_tank_lieutenant"] execVM "scripts\Vehicle_Equipage_Filtrage.sqf";
["Tank","LIB_GER_tank_unterofficer"] execVM "scripts\Vehicle_Equipage_Filtrage.sqf";
["Tank","LIB_GER_tank_crew"] execVM "scripts\Vehicle_Equipage_Filtrage.sqf";
["Tank","LIB_GER_spg_lieutenant"] execVM "scripts\Vehicle_Equipage_Filtrage.sqf";
["Tank","LIB_GER_spg_unterofficer"] execVM "scripts\Vehicle_Equipage_Filtrage.sqf";
["Tank","LIB_GER_spg_crew"] execVM "scripts\Vehicle_Equipage_Filtrage.sqf";
No unit can stay in the tank.

I have tried different forms, but it doesn't work :
_units = ["LIB_GER_tank_lieutenant","LIB_GER_tank_unterofficer","LIB_GER_tank_crew","LIB_GER_spg_lieutenant","LIB_GER_spg_unterofficer","LIB_GER_spg_crew"];
{["Tank",_units] execVM "scripts\Vehicle_Equipage_Filtrage.sqf"};
OR
_units = ["LIB_GER_tank_lieutenant","LIB_GER_tank_unterofficer","LIB_GER_tank_crew","LIB_GER_spg_lieutenant","LIB_GER_spg_unterofficer","LIB_GER_spg_crew"];
{["Tank",_x] execVM "scripts\Vehicle_Equipage_Filtrage.sqf"};
OR
_units = ["LIB_GER_tank_lieutenant","LIB_GER_tank_unterofficer","LIB_GER_tank_crew","LIB_GER_spg_lieutenant","LIB_GER_spg_unterofficer","LIB_GER_spg_crew"];
{["Tank",_x] execVM "scripts\Vehicle_Equipage_Filtrage.sqf"} foreach _units;
OR
_units = ["LIB_GER_tank_lieutenant","LIB_GER_tank_unterofficer","LIB_GER_tank_crew","LIB_GER_spg_lieutenant","LIB_GER_spg_unterofficer","LIB_GER_spg_crew"];
{["Tank",_units] execVM "scripts\Vehicle_Equipage_Filtrage.sqf"} foreach _units;
Or all soldiers can enter in the tank, or nobody can enter.

I think that the problem is very easy to resolve, but i don't see how find the solution.



Another question : when it works for one classlist, only the driver is locked. How can i do in order to lock the Commander, the Gunner, the Loader and the Machinegunner too ?

__________________
0
Joarius

Avatar / Picture

IFR Team
Registered:
Posts: 290
Reply with quote  #32 
Does anybody would have an idea ?
I'm searching on internet, but yet, i have not found another script allowing what i'm searching. [frown]

__________________
0
Shrck

Sergeant
Registered:
Posts: 94
Reply with quote  #33 
Joarius, Im sorry but I can't help right now. 
The main idea I think is to check typeof player and if the type is one from the list of tankmans do 1, if not - do 2.
So by the quick look script above have sense. (but, don't forget abour different player types for Germans and Russians)

Maybe I'll have time to help you find a solution later.

__________________
"The only way to get smarter is by playing a smarter opponent" (Fundamentals of Chess, 1883)
0
Joarius

Avatar / Picture

IFR Team
Registered:
Posts: 290
Reply with quote  #34 
Thank's for the answer. [smile]
I will try to work on this script. I'm a real noob in script, so i don't know if i will succeed. But i wil try. [wink]

__________________
0
rowdied

RM Team
Registered:
Posts: 146
Reply with quote  #35 
joarious,

try the BIS forums. I know there where a couple of mp missions that had these exact requirements. Don't recall which ones but they were along the lines of Domination and Evolution.

Have you been to this site? You might find something you can use

http://www.ofpec.com/
0
Joarius

Avatar / Picture

IFR Team
Registered:
Posts: 290
Reply with quote  #36 
I will watch the site that you indicates for others stuffs. Thank's for your answer. [smile]
For BIS Forums, i have begun to watch in the editing section, but as French, it's not easy to me to read quickly titles, so it asks me more times as you... [confused]

But yesterday, Catsy from Les Ailes Libres (The Free Wings in english) has worked on the script that i have shown, and now it works ! [smile] Only Tankists can go in tanks.
@Shrck : Catsy has used exactly the command that you propose (typeof player). [smile] As what the great spirit meet them. [thumb]



Actually, i have always problems with :
10 - Problem with a trigger code
11 - Problem with onLoadMission and onLoadMissionTime

I will make tries with 10 today. But for 11, it's understandable for me... [confused] [eek] The three lines involved are exactly the sames that the three lines of my first mission (which shows the name of the mission). So it's a great mystery for me.


__________________
0
Joarius

Avatar / Picture

IFR Team
Registered:
Posts: 290
Reply with quote  #37 
The next points have been solved :
10 - Problem with a trigger code
11 - Problem with onLoadMission and onLoadMissionTime


But i have new questions... [biggrin]
14 - How to set the duration of the briefing and the mission before launching the mission ?
15 - How display the remaining time with a " dynamic counter " in the briefing and the mission ?

__________________
0
Shrck

Sergeant
Registered:
Posts: 94
Reply with quote  #38 
Quote:
Originally Posted by Joarius

14 - How to set the duration of the briefing and the mission before launching the mission ?


Well, firstly, I suppose there is no such terms as "duration of briefing" and "duration of mission" for standart arma/IF means. So all durations is your concern, your scripts, I guess you know that [wink]
But, about settings before mission launching, I heard there is a built in system.
There is a class Params you can add to the description.ext file. Read more about it. For example here https://community.bistudio.com/wiki/Arma_3_Mission_Parameters (don't care its about a3)
or here http://forums.bistudio.com/showthread.php?101354-Class-Params-for-MP-(class-TimeOfDay)-etc

as I undersatand the idea: you add some variablaes and values to this class and get a possibility for server admin press button "parameters" on the lobby screen, change them. Your mission scripts can refer to this variables (sort of ?variable? = paramsArray select ?number?)

I know its not a real help, but a direction to learn more [wink]
Quote:
Originally Posted by Joarius

15 - How display the remaining time with a " dynamic counter " in the briefing and the mission ?


hm... again, no standart means, custom scripting. imho. Google "arma 2 countdown script"

__________________
"The only way to get smarter is by playing a smarter opponent" (Fundamentals of Chess, 1883)
0
Joarius

Avatar / Picture

IFR Team
Registered:
Posts: 290
Reply with quote  #39 
Thanks for this answer : this is a beginning that helps me, and it's good. [smile]
__________________
0
Joarius

Avatar / Picture

IFR Team
Registered:
Posts: 290
Reply with quote  #40 
Someone would know if scripts exist, allowing to respawn for Germans AND Russians in the same mission, with specific mobile respawns and fix respawns ?
__________________
0
Gunter Severloh

Avatar / Picture

Admin
Registered:
Posts: 2,758
Reply with quote  #41 
Whatever you see here http://ironfront.forumchitchat.com/?forum=285529
is what we have.

__________________
0
Joarius

Avatar / Picture

IFR Team
Registered:
Posts: 290
Reply with quote  #42 
I 've already searched, but i 've not found what i want.
I recognize that my english is not good, so i will read these posts again.
Thx Gunter.

__________________
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.