Jump to content

Rosso777

Member
  • Content Count

    130
  • Joined

  • Last visited

  • Medals

Posts posted by Rosso777


  1. Here is the original script set for a player model, but how would I mod it to also apply to an AI?


     

    if(isTouchingGround player && alive player && _curpos select 2 < 1)then

                        {

                            _nearestObjects = nearestObjects [player, ['Exile_Construction_Abstract_Static','AbstractConstruction','Exile_Construction_Flag_Static'], 2.8];

                            if(_nearestObjects isEqualTo [])then

                            {

                                _last_no_glitch_pos = _curpos;

                                _last_no_glitch_vectorDir = vectorDir player;

                                _last_no_glitch_vectorUp = vectorUp player;

                            };

                        };

     


  2. Looking to build my own mod and I’m trying to understand some structuring. I know this isn’t an Exile forum, but I don’t believe this question really pertains to Exile, per se, so I’m hoping this will be an easy one. Using Exile as a template for learning. 
     

    Inside the mod, the structure is laid out like this:

    @ ExileMod > addons > numerous pbo’s (assets, client, and many model pbo’s for cars/bikes/planes).

    NOTE: in the initial folder where ‘addons’ is located, there is also a config.bin file. 

    So here’s my main question (the first of many I’m sure):

    if I were to create a vehicle pack, for example, of vehicles I’ve created, how would I go about installing them into the main mod? I don’t want to create an external addon, I want the models and items to be included in the mod itself. Is it possible to do like a ‘#include /myvehicles/config.bin’ in the appropriate place in the mod’s main config? Or am I way off base here? I say this because I can’t imagine that just putting the models pbo’s in the main folder will just automatically activate. 


  3. 50 minutes ago, beno_83au said:

    Well, if it's only 3 of you you may as well keep it simple. Run this in onPLayerRespawn.sqf:

    
    switch (getPlayerUID player) do {
    	case "3168468746512": {player setPos (selectRandom [_pos1,_pos2]);};
    	case "5413546843212": {player setPos (selectRandom [_pos3,_pos4]);};
    	case "6544164161261": {player setPos (selectRandom [_pos5,_pos6]);};
    	default {player setPos [0,0,0];};
    };

    Update: Okay, so I created a file named onPlayerRespawn.sqf and added it to my mission file. It literally ONLY has the following code in it (a modified version of the above). When a player respawns, he respawns ANYWHERE on the map randomly, including outside the borders. For the test, I am p1. Not sure what I am missing.

    My version:

     

    switch (getPlayerUID player) do {
        case "7656119797729xxxx": {player setPos (selectRandom [[1291,12685,0],[16490,19125,0]]);};      //p1
        case "7656119800446xxxx": {player setPos (selectRandom [_pos3,_pos4]);};    //p2
        case "7656119808028xxxx": {player setPos (selectRandom [_pos5,_pos6]);};    //p3
        default {player setPos [7000,7000,0];};
    };

    @beno_83au, do I need to leave it as _pos1, _pos2... and then identify those _pos as specific coords?


  4. Hey guys. I run a small private dedicated server for my family, so there's only 3 of us who play on the server. I am trying to reconfigure the respawn so that it identifies the player's UID and then spawns them in their own personal spawn location (within an array of possibilities). I know the general idea of how the IF-THEN format should go, but I am braindead on how to configure this. (Admittedly, this is a (albeit SAD) deconstruction of the ExileMod respawn code, if it looks familiar to anyone).

     

    So, I have the list for each player's camps, identified by the _private PLAYERNAMECampSpawns but I'm not sure on how to set that to an array that the system will know to 1) identify the player by UID, then 2) identify their list of potential spawn points. I was going to go down the route of: _spawnAreaPosition = getMarkerPos _PLAYERNAMECampSpawns for each player (there's only three of us so no major effort), but I know there is a way to keep it cleaner and more efficient (maybe at this point in my learning I shouldn't care about such things and just work on getting things to WORK 🙂). 

    If anyone can offer any guidance here, even a BIKI link to get me a bit further, I'd be grateful. Thanks as always.

     

    Note: This is just a PIECE of the script; didn't want to be obnoxious with the post size.

     

    Spoiler

     

    private["uid","_sessionID","_requestingPlayer","_spawnLocationMarkerName","_newPlayer","_accountData","_direction","_position","_spawnAreaPosition","_spawnAreaRadius","_player"];


    _sessionID = _this select 0;
    _requestingPlayer = _this select 1;
    _spawnLocationMarkerName = _this select 2;
    _newPlayer = _this select 3;
    _accountData = _this select 4;
    _UID = _this select 5;
    _direction = random 360;

     

        _UID = getPlayerUID _requestingplayer;
        _spawnAreaPosition = getMarkerPos _CampSpawns;
        _spawnAreaRadius = getNumber(configFile >> "CfgSettings" >> "SpawnSettings" >> "spawnZoneRadius");
        _position = [_spawnAreaPosition, _spawnAreaRadius] call Client_util_math_getRandomPositionInCircle;
        while {surfaceIsWater _position} do
        {
            _position = [_spawnAreaPosition, _spawnAreaRadius] call Client_util_math_getRandomPositionInCircle;
        };
    };

     

    private _RossCampSpawns = selectRandom
                                                [
                                                     "1000, 1000, 0",

                                                      "2000, 2000, 0"
                                                ];

     

    private _BertCampSpawns = selectRandom
                                                [

                                                     "3000, 3000, 0",

                                                      "4000, 4000, 0"
                                                ];

     

    private _PopCampSpawns = selectRandom
                                                [

                                                     "5000, 5000, 0",

                                                      "6000, 6000, 0"
                                                ];

     


  5. I am trying to modify a script that spawn an AI assistant. The original code spawns the AI directly on your position, but I want the AI to spawn about 200 meters from the current player position.

     

     

    Here is the original line:     _unit = group player createUnit [_unitList select (round(random ((count _unitList) - 1))), getPos player, [], 0, "FORM"];

     

    Here was my version that did not work:    _unit = group player createUnit [_unitList select (round(random ((count _unitList) - 1))), [getPos player + 200], [], 0, "FORM"];

     

    I've tried digging around the BIKI but there wasn't much available on the getPos page. I also found this, but not sure if it's a completely different aspect: ((getPos player) vectorAdd [((random 400)-200),((random 400)-200),0])

     

    Can anyone offer some insight?

     


  6. 11 hours ago, wogz187 said:

     

    I'm not sure what dependencies means in this case. MMF_core must be installed to the mission root folder.


    Gotcha. That answers my question, essentially. I was trying to move only the necessary code from the Black Magic mission file to my own existing mission. 
     

    I will do as you’ve suggested and get into the Black Magic mission further; I wasn’t thinking about the function viewer and all that. And I will also pay more attention to the Discord How-To’s. 

     

    You should be VERY proud of this system, man. As soon as I entered the BM mission and saw the mirror, heard the news broadcasts, and then saw how you were configuring  it all (in the editor), I was beyond impressed. I know this game can do a lot but it takes items like this that (I feel) truly capitalize on the game’s capabilities. Bravo. 

    • Like 1

  7. Is it possible to list somewhere each function's dependencies? I don't even know if that's plausible since there is so much going on within MMF, but it was worth a try. I am trying to dig in deeper and I am still questioning where things go and how. I feel like a dumbass after all the help you've already granted, but MMF is still a bit too complex for a basic user like me. INCREDIBLE, but I'm in too deep here. I've joined the Discord and perused a bit, read through this thread, toyed with other missions, but there's SO Much that I don't even know where to begin.


  8. Hi all! I am trying to activate an external sqf that spawns animals in a specific radius around a player, but only when that player is up in a specific model of deerstand. Currently, this is w

    what I have, but it doesn’t seem to be working. 

    here is the file that is ensuring that the system knows the player is “in” the deerstand; Client_util_getNearestHuntingStand:
     

    private["_position", "_huntingStand", "_object"];

    _position = _this;

    _huntingStand = objNull;

    _object = _position nearestObject "Land_DeerStand_02_F";

    if !(isNull _object) then

    {

        if ((_object distance _position) < 3) then

        {

            _huntingStand = _object;

        };

    };

    _huntingStand

     

    ——————————————

     

    and At the top of the spawn animals file, I have this to make the parameters are identified:

     

    if ((vehicle player) call Client_util_getNearestHuntingStand) then....
     

     

    Does anyone see the issue? Or does this look fine and it must be elsewhere? OR am I SO FAR off that it's not even worth trying to guide me through this ('m okay with that, give it to me straight)?


  9. 1 hour ago, Larrow said:

    ... it will convert it to .cpp and place it where ever the original .bin was located.

     

    So @Larrow, if the file is named config.cpp instead of config.bin, it will still work properly?

     

    UPDATE: Using Arma 3 Tools, specifically the CfgConvert program, I was able to convert the config.bin file to config.cpp. Using Notepadd++, I was able to edit the config file. Then, again using the CfgConvert program, I converted the file back to Config.bin.

    • Like 2
    • Thanks 1

  10. I’ve had a lot of success lately with reconfiguring addons and mods, but I cannot seem to figure out how to edit the infamous “config.bin” or “texheaders.bin” files. Well, I can edit them through Notepad++, but when I go to save as .bin and then replace the original in the mod folder, it never seems to work. 
     

    Can anyone point me in the right direction?

     

    Also— I’m aware of (and have installed) the Arma 3 Tools programs. If this is what I’m supposed to use for this, please lead me through how it’s done. So far “just use the Arma Tools” hasn’t gotten me anywhere. 
     

    Explain me like I’m five. 😉 


  11. I have done exactly as you've said, got the addon subscribed to on my server, and the scenario loads fine. I loaded only 1 module and that was the Advanced Transport. However, what is interesting is that the moment before the game loads, there is a quick flash of "CALL TAXI" as an addaction, and then its gone. Once I have control of my player, I do not have the Call Taxi option.

     

     


  12. I cannot seem to install this any longer (on my dedi server). I had it working once, but now I can't seem to figure it out. I have tried placing the MGI_Modules.pbo in my server addons section (like DMS and Occupation), and I have also tried making it an "@MGI_Modules; folder" placed in the server root folder, but nothing.

     

    It works in the editor, so I place an ADVANCED TRANSPORT module. 

     

    I place a CIV helo and a CIV truck. 

     

    In the Editor's preview mode, I can call the taxis and all works perfectly. I export the .SQF and call it in my dedi's initserver. When I load the server, the CIV vehicles are there, so i know the SQF is being called. However, the CALL TAXI addaction is not showing up for the player. 

     

    Can anyone see what I am doing wrong?


  13. On Biki, the addAction reads like this: "Adds an entry to the action menu of an object (scroll wheel menu)."

     

    Is it possible to add a menu that's NOT activated by the scroll wheel?

     

    For example, I am thinking about giving the itemRadio object a few more options (Call a Taxi, Call for Extraction, etc.) but the menu only appears if a specific button is pressed; having a permanent scroll wheel menu once picking up a radio would be obnoxiously annoying.

     

    Is this doable?


  14. Hi all! I have scoured these forums (and many others), and I don't know if I am just not using the proper search terms, or if there is no answer to this issue.

     

    Has the issue ever been solved where Zeus (on a dedicated server) is just suddenly no longer accessible by the admin? I am the only admin on my private dedi server, and sometimes, I login and Zeus works beautifully. And it's almost as if the next time I login (or the next time), it just won't give me access anymore... as if it doesn't exist at all. The following day I login and it's good again. Has anyone else been dealing with this as well? Has a fix been found?  

    Any help is always appreciated. Thanks, everyone!


  15. If misunderstanding the sleep command is the only real error there (so far), than I am one happy camper! Thanks guys! I am going to test this tonight when I get home.

     

    Additional learning: So when building something like these spawns, you can essentially configure them how you want as long as you refer back to the _select correctly? Aside from simplicities like units or values, what other types of parameters can go in there?

     

    EDIT: Okay, I am now realizing that this has turned into a private lesson thread. And, as much as I am absolutely loving this process, I am sure you guys are exhausted with such tasks. I appreciate all the help, fellas. I will do my best to keep researching things on my own instead of sending constant feedback loops.


  16. 17 minutes ago, wogz187 said:

    @Rosso777,

    
    [this, 3] spawn { sleep (_this select 1); systemChat format ["%1 waited %2 seconds", _this select 0, _this select 1];};

    In the above example we are selecting from the array at the beginning of "spawn". So select 0 is "this"-- the unit and select 1 is the number (arrays start at 0).

    Have fun!

     

    I am going to translate to ensure I understand: By that code example, THIS (an AI, for example) is stopped for 3 seconds. A message then appears in systemChat that reads: "THIS waited 3 seconds"   So the {sleep is placing a hold on the unit (identified by the _this).

    _this select 0 is referring back to the THIS in the initial bracket set.

    _this select 1 is referring back to the 3, which is a variable that WE chose to set. 

     

    If we were to establish another parameter (wait... is that initial bracket [this, 3] the params? Am I actually understanding?) and add Joe to it, it might go something like this:

     

    [Mark, 13, Joe] spawn { sleep (_this select 1); sideChat format ["%3 is watching %1 do nothing for %2 seconds!", _this select 2, _this select 0, _this select 1];};

    Goal:               Sidechat: "Joe is watching Mark do nothing for 13 seconds!"

    • Like 1
×