Jump to content

dragon zen

Member
  • Content Count

    267
  • Joined

  • Last visited

  • Medals

Posts posted by dragon zen


  1. Hello friends:

    I have known how to search all existing soldiers in certain mod. But I got a question:

    I use following script, but there are still some men which can not create in the mission, they are base type or other thing, can't be created.

    So I ask besides _display_name and _mode, which variable should I use to flite soldiers??

    Thanks.

    _soldierall=configFile >> "CfgVehicles";

    for [{_i=0}, {_i<count _soldierall}, {_i=_i+1}] do {

    _soldier=_soldierall select _i;

    if (isClass _soldier) then

    _type=getText(_soldier >> "vehicleclass");

    if(_type in ["Men"])then

    {

    _name=configName(_soldier);

    _display_name=getText(_soldier >> "displayName");

    _side=getNumber(_soldier >> "side");

    _weapons=getArray(_soldier >> "weapons");

    _faction=getText(_soldier >> "faction");

    _model=getText(_soldier >> "model");

    if((_display_name!="")&&(_model!=""))then {XXXXX};

    };

    };

    };


  2. Hey bros:

    Nowadays I'm working on scripts such as selecting weapon, adding ammo. I want to find a brief introduction of cfgWeapon.

    XXX >> XXX >> XXX, too much kinds of these, I don't know the meaning and relationship of them, so I seek for an intro of structure of cfg, especially cfgWeapon now. If I get the display name of magazine, what code should I write so that I can search it, locate it and then get more information about it? :confused:

    Many more question. For example, there is a {_weapon >> "type"}, which number refer to which kinds of type, where can I learn this kind of thing? If I get new addons (for example ACE2), how can I view the weaponlist more easily?

    In all, I don't know where can I learn these. It seems that wiki didn't provide this aspect of info??:butbut:

    So, I appreciate if anyone can give some advice.

    DragonZen

    ---------- Post added at 11:13 PM ---------- Previous post was at 11:09 PM ----------

    Of course, learn from other's scripts, I can follow their code and do some things. But I still can't use it in a flexible way, so I want to know the structure of cfgWeapon pur se.


  3. Sorry guys, ask a simple question.

    I use _cost = "ARTY_Sh_105_HE" createVehicle [_px2,_py2,0]; to stimulate Artillery Fire, quite OK.

    However, I want to make big smoke wall, don't know what to create. I tried "ARTY_Sh_105_SMOKE", nothing happen.

    :confused:Ask for help.

    THANKS

    ---------- Post added at 06:51 PM ---------- Previous post was at 06:49 PM ----------

    Does this mean that "ARTY_Sh_105_SMOKE" is not what I want?

    I think the smoke from tank is also OK, but the smokeshell from soldier is too small.


  4. Hey friends:

    I have saw many beautiful ARTY scripts, but it seems that they are too complex. Another problem is that Artillery Module can't feedback the killer use EH-Killed.

    Recently I saw the "Proving Ground.utes" mission, in which there is a function that adjust the angle of artillery automaticly. Sometimes we just need simple artillery, so this is very good, not only for players but also for AI. With this function, it is easy to make the main-body of artillery. Besides, the system in ACE2 is also very useful.:yay:

    Ah.. because I didn't find the code, I want to ask whether anybody can provide some scripts that let AI shoot at far target directly? And how to calculate the angle is a necessary part of it.

    Thanks

    DragonZen


  5. Thanks, chicago. Now the major function is OK.

    There are still some question:

    1:I saw you use "PXS_keyEventHandler = (findDisplay 1000) displayAddEventHandler ["KeyDown","_this call PXS_keyEventFunction"];" However others use "(findDisplay 46) displayAddEventHandler ["KeyDown","_this call PXS_keyEventFunction"];". Is there any difference between display 46 or 1000???Why wiki say 46 is a special number?

    2:What's more, what is the meaning or necessarity of "#define FACTOR 50", I never saw this kind of code. Is this same as "FACTOR=50;"?

    3:I saw you use "case (({_x in _pressedButtonArray} count (actionKeys "MoveForward")) > 0)", why this code can check key moveforward?? I mean what is the mechanism of ({_x in _pressedButtonArray} count 17) > 0 ??

    4: I saw your "KeyFucntion.sqf" has three variable:

    _event = _this;

    _keyCode = _event select 1;

    _return = true;

    What is the importance of _return and _event?? I saw other function-sqf just use "nil;" at the end. So I don't understand why you write so.

    Thanks a lot.


  6. @Dragon Zen: Well, I can tell you about my project of Satellite view. There´s a link on armaholic.com

    Haha, thanks CHICAGO. I want to learn sattelite from you, and add you in my thankslist then:D.

    I saw your SATCOM, but it is too complex. My need is simple now, I just want to know how to let player handle the camera. It seems the KeyDown function combines more than one sqf, so I can't learn it from others' scripts. I saw the wiki but don't understand it yet.


  7. Mark, I have the same question.

    It seems there are much great ARTY script with complex function. As new learner, I just want to know how to use it simply in my mission.

    BTW, it seems that ARTY module can't feedback the ID of artillery. For example, if I attach EH-kill to target, it just report killer is obj-Null. Is it possible to teach AI fire directly from far distance??

    I saw that in "Battlefield3.utes", there is a function to calculate angle of shot for player automaticly, that's very cool!!! (But I don't know whether AI can use it.)

    Wait for some brothers to teach us a more easy ARTY scripts.

×