Jump to content

Xzempt

Member
  • Posts

    65
  • Joined

  • Last visited

Posts posted by Xzempt

  1. Don't the hints show in the middle of the screen? I don't know if you're familiar with blck_eagls AI missions but it gives a message on the right  side of the screen saying something about a Bandit Patrol has been spotted in a near by sector. That's the kind of message I'm looking to use

  2. I'm not sure the correct terminology here, so bear with me a moment. I need this script to execute multiple times.

     

    For instance, say I need it to execute every 600 seconds. Can you perhaps point me in the direction i need to go?

    One more thing, What command am I looking for to give me a message on the right of my screen like some of these other mission scripts do?

  3. hmm, won't that some times give me a number below the _min value?

    say for instance, if

    (random floor _min) returned 1 and 
    (random floor _max)returned 3

    1 + 3 / 2 = 2. ya?

     

    I ended up doing it like this

        _number = floor(random _maxCrashProtectors);
        
        if (_number < _minCrashProtectors) then {
            _number = _minCrashProtectors;
        }
        else {
            _number = _maxCrashProtectors - _number;
        };
        while {_number < _maxCrashProtectors} do {
            _soldierCrash = _soldiers select floor random count _soldiers;
            _soldierCrash createUnit [_randomPos,_crashGroup ,"this allowFleeing 0", 0.5, "Private"];
            _number = _number + 1;
        
        };
    

    Is this bad? I read somewhere using while is bad?

  4. Can someone point me to what I'm looking for here. I have 2 variables. both numbers, I need to choose a random number between the 2 variables. What command am I looking for. I don't think random will do that will it?

     

    I mean I could do:

     

     

    _minimumValue = 5;
    _maximumValue = 10;
    _number = random(_maximumValue);
    if (_number < _minimumValue) then {
    _number = _minimumValue;
    };

    But wouldn't that make _minimumValue the more oftenly chosen number?

  5. Well, yes and no. Vehicles has what's called "named selections" that are defined when model is created. These selections are used to give objects certain properties, like - a cargo/container space. This ofc means if wreck does not have one, then answer is no. You can check if vehicle has cargo by just looking at it and trying to store items in it.When making your own @mods, you can add cargo spaces yourself (as long as you have access to unbinarized p3d files).... in your case as server admin, answer is still a no.

    However, nothing is stopping you from using cargo space as a separate (invisible object that was designed specifically for this task) vehicle/object spawned beneath or nearby this wreck that can hold your items, just like original script does it. (The stuff i was talking about)

    Thanks for your answer. I will never learn if I use  already existing scripts though. I'm aware that re-inventing the wheel is mostly useless, however  it does have it's purposes. lol

    This is my first attempt at arma3 scripting and I'm learning slowly using the link I linked in the first post and through input from others. Thank you very much for your time in replying and helping me out. It's greatly appreciated.

     

    Oh, and one more thing. I don't guess scripts made in the  local editor (not mp one) will work on a server huh? Still don't know why I can't use the multiplayer editor...

  6. you can't put vehicles in your inventory, if I understand your question correctly. Also lol.

    However, mr IT07 is right, you can spawn weapon holder (invisible) container and put loot inside it. But you will be reinventing the wheel, because this has been already done and is part of vanilla mod. Just reuse Epoch's function that does this, you can find it in server side files I believe.

    I was asking can you put items in the vehicles inventory. I know you can on a perfectly healthy vehicle. but In this case it's a wreck vehicle.

  7. Time isn't a problem for me, haha. Just need someone/where to bounce things off of when I get stuck.

     

    Edit: Which reminds me. Is it possible to add items to the inventory of a wreck like "Land_UWreck_Heli_Attack_02_F"

  8. Anyone care to give me a hint on this?

    Error in expression <andom(count _crashPos));


    _crashMarker = createMarker ["Warning",[_randomPos]];
    _>
    23:06:27   Error position: <createMarker ["Warning",[_randomPos]];
    _>
    23:06:27   Error 1 elements provided, 3 expected

    script file:

    //create crash position
    _crashPos = ["5466.86,14993.9","9144.6,21475.8","26880.7,24573.7","6504.54,12306.3","8313.33,9570.95","10717,7612.08,20998.7","7300.87,24181.5,15575"];

    //should return position from above array
    _randomPos = floor(random(count _crashPos));
    _crashMarker = createMarker ["Warning",[_randomPos]];
    _crashMarker setMarkerShape "Ellipse";
    _crashMarker setMarkerType "Empty";
    _crashMarker setMarkerColor "ColorRed";
    _crashMarker setMarkerSize [400,400];

     

  9. Is there a tutorial anywhere to help newbies get started learning to script in Arma3? I keep trying to run the editor on Multiplayer but when I select my role and then click ok it just gets stuck at the map screen with the continue/cancel button. Nothing is clickable or anything. Obviously I would need whatever I make to work with multiplayer.

     

    I have found this: https://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3 I'm sure that will come in extremely handy.

    Any other information would be greatly appreciated.

    Can someone point me towards tutorials on getting started and any documentation for scripting or related documentation of functions and what not?

  10. Is there a reason or setting im missing thats causing custom spawn ai to despawn when no one is around? Nevermin; found it.

     

    //Time to allow spawned AI units to exist in seconds before being despawned when no players are present in a trigger area. Applies to both static AI and custom spawned AI (Default: 120)                                        
    A3EAI_despawnWait = 10800;  

  11. Only problem I'm having now is create vehicle restriction #1

     

    1 "" !"smallbackpack_(red|green|teal|pink)_epoch" <-- line 3

     

    #1 "smallbackpack_green_epoch" 3:4 [0,0,0]
    #1 "smallbackpack_red_epoch" 3:4 [0,0,0]
    #1 "smallbackpack_red_epoch" 3:4 [0,0,0]
    #1 "smallbackpack_green_epoch" 3:4 [0,0,0]
    #1 "smallbackpack_pink_epoch" 3:4 [0,0,0]
    #1 "smallbackpack_teal_epoch" 3:4 [0,0,0]

     

    Do you see what I'm doing wrong?
     

×
×
  • Create New...