Jump to content

dimdic

Member
  • Content Count

    60
  • Joined

  • Last visited

  • Medals

Posts posted by dimdic


  1. Hi there !! The command assignedVehicleRole may return:

    [] - Not assigned to any vehicle

    ["Driver"] - Assigned as driver

    ["Cargo"] - Assigned as cargo

    ["Turret", [turret path]] - Assigned to a turret

    (http://community.bistudio.com/wiki/assignedVehicleRole)

    E.g. _RoleArray=assignedVehicleRole player

    With which code can i check if the returned array is empty??? Is there any way to check this, except from using the command count ? E.g.

    _RoleArray=assignedVehicleRole player;

    if (isNull _RoleArray) then { hint 'empty'}; //isNull _RoleArray doesn't work !!


  2. I have created a mission where a M113 vehicle is driven by the player. At a moment a trigger activates an ied 10 meters in front of the m113 and a script file is executed ! I have positioned opfor units behind some rocks near the ied. Their preferences are : CombatMode never fire, behaviour: safe, stance: prone, and initialization statements: disableAI "MOVE". The script of the code is this :

    {
    if ( (side _x==east) ) then {
    
        _x enableAI "MOVE";
        _x setUnitPos "AUTO";
    
        _x setSkill 1;
        _x setSkill ["SpotDistance",1];
        _x setSkill ["AimingAccuracy",1];
        _x allowFleeing 0;
    
        _x setBehaviour "AWARE";
        _x setCombatMode "RED";
        _x reveal player;
        _x reveal (vehicle player);
        _x doFire (vehicle player);
        forceRefreshTargets (group _x);
        };
    }forEach allUnits;
    
    
    

    The problem is that opfor units DON'T fire their weapon (they do nothing) which is very strange. I want them to fire against M113. Opfor units are not in a group. What shall i do to work properly ?? Thank you.


  3. I have written a piece of code, but it doesn't work. Here i am explaining what i want it to do: The player has 5 subordinate units. I want a hint to appear when the player selects a specific subordinate unit (soldier 3 with name "name_of_soldier3").

    What's wrong with it ??

    _myfun=
    {
         private ["_cond"];
         _cond=_this select 0;
         waitUntil
         {
               hint "Waiting to select soldier 3 (press button F3)";
               call _cond
         };
         sleep 2;
         hint "You have selected soldier 3";
    };
    
    _cond= { (((groupSelectedUnits player) select 0)==name_of_soldier3) };
    
    _z=[_cond] spawn _myfun;
    
    

    Unfortunately, when i am the player and select soldiers 3 nothing happens :d:

    Any ideas??

    Thank you.

    ---------- Post added at 11:27 AM ---------- Previous post was at 10:44 AM ----------

    FINALLY IT WORKS FINE !!!!! sorry about this post, erase it please !! :/

    I have written a piece of code, but it doesn't work. Here i am explaining what i want it to do: The player has 5 subordinate units. I want a hint to appear when the player selects a specific subordinate unit (soldier 3 with name "name_of_soldier3").

    What's wrong with it ??

    _myfun=
    {
         private ["_cond"];
         _cond=_this select 0;
         waitUntil
         {
               hint "Waiting to select soldier 3 (press button F3)";
               call _cond
         };
         sleep 2;
         hint "You have selected soldier 3";
    };
    
    _cond= { (((groupSelectedUnits player) select 0)==name_of_soldier3) };
    
    _z=[_cond] spawn _myfun;
    
    

    Unfortunately, when i am the player and select soldiers 3 nothing happens :d:

    Any ideas??

    Thank you.


  4. Thank you Igneous01!!

    1. Works fine ! I think (this && !(unitname in thisList)) works also fine.

    2. I made a mistake in my second question. Here is the right one :

    I have a trigger with Activation "OPFOR" and activation type "Detected by Blufor". I want a specific Blufor that sees an Opfor without activating the trigger.

    1. condition: this && {_x != unitName} count thisList > 0

    This will fire when a blufor unit is in the trigger, and that one or more blufor units must be inside the trigger area, that are not the unit specified.

    2. condition: this && {_x != unitName} count thisList > 0

    should work as well, thisList returns the detected units I think, so if theres a guy in that list thats not the opfor guy, then it will fire.


  5. I have a trigger with Activation "BLUFOR" and activation type "PRESENT" . I want a specific Blufor Unit that passes through the trigger area without activating the trigger ! Is this possible ? Thank you.

    I also have a trigger with Activation "OPFOR" and activation type "Detected by Blufor". I want a specific Opfor Unit that is seen by Blufors without activating the trigger.


  6. Hi there. I have the following problem: During my mission I am creating a unit (airplane) using the createVehicle command (_myair="airplane" createVehicle (getPos soldier) ). Later on i want to delete the airplane that i created. BUT the command "deleteVehicle object _myair) ; " doesn't work. As i can see, "_myair" is not the name of the airplane that i created. How can i set a name to the airplane so that i can refer to it later on ? Or is there any other solution to my problem ? Thank you.


  7. To be more accurate.. i created a multiplayer senario and when i tested with my friends i found out several problems. So i need your help concerning the following:

    1)Commands that are executed in a trigger "On Activation" field, are executed on all machines !! I DON'T WANT THIS TO HAPPEN !!! I want them to be executed only once!!

    2)I have created an introduction with a moving camera in the beginning of the senario and only the one who is the server can see that.

    Does anybody know how to solve these problems ???

    Are there any other basic things that i should know before or after creating a multiplayer senario ? Or any problems that i am going to face and i haven't spotted them yet??

    Thank you.


  8. My problem is that if i use the commands "unitname stop true;" "unitname disableAI" then i need to run a script with the commands "unitname stop false" or "unitname enableAI "MOVE";" "unitname enableAI "ANIM";" and i don't know the condition (and how) i should run this script! And this because I want my units to be stanionary, and then (WHENEVER i want) select them and order them to get in a vehicle !!

    Hi dimdic,

    you can use the stop command.

    unitname stop true;

    will make it stop. If that doesn't work properly, try:

    unitname disableAI "MOVE";
    unitname disableAI "ANIM";

    which will definitely stop them but they won't even blink in this mode. No random animation like looking around or picking nose. :)

    Important! To disable the commands and make them move again:

    unitname stop false
    unitname enableAI "MOVE";
    unitname enableAI "ANIM";

    One more hint: You can search for related commands in the new OFPEC COMREF search system. If you e.g. want all commands that contain the word "stop", you search for it and it will show you them all (and some more related ones). That's quite useful when you know what you want to do but don't know the exact command name.

    Together with the BIKI it's very useful for editing!


  9. Hi there! I have put my subordinate units in the map in a column, having a direction of 270 degrees (degrees are measured clockwise from north). I put the commandStop (i tried also doStop) in the init for all my subordinate units because i want my units to be stationary at beginning of the mission even if i move around them (i am their leader). BUT when the missions starts and command "commandStop" runs, my units change direction automatically and look at north (0 degrees). Do anyone know what's going wrong, and how can i solve this problem ?? Thank you a lot.


  10. Gnat;2186533']Not sure the answer to your specific question' date=' but I will point out that even if you do identify the animate name (it's buried in the MODEL.CFG file which ceases to exist after you binarize the addon), you may not be able to animate unless its a USER controlled animation anyway.

    Example: Landing gear

    If you find the name, you won't be able to control it because the game engine has DIRECT and overriding control via the "gear" animation function.[/quote']

    I want to find the names of the bow and stern ramp of an LCAC ship! A player can animate these doors by the action "operate machinery"!! Do anyone have the idea of these names ??

×