Jump to content

HereIsJones

Member
  • Content Count

    58
  • Joined

  • Last visited

  • Medals

Posts posted by HereIsJones


  1. 11 hours ago, Harzach said:

    I guess the angle I was taking was more along the lines of:

    
    {
      if (_x in _array && (_x distance _center < 150)) then {deleteVehicle _x}
    } forEach _array;

     

     

    Ah, ok I get it now. I had an array of class names, but you created an array of objects at the point of object creation. That would have worked as well.


  2. I guess my question is, how do you use an array element to point to a simple object?  Here's my array:

    _compSimple =
    [
          ["Land_CncBarrier_stripes_F",[11068,8464.88,0],[[0,1,0],[0,0,1]]],
          ["Land_WoodenCounter_01_F",[11077.9,8467.94,0],[[0.1793,0.983794,0],[0,0,1]]],
          ["Land_PaperBox_01_small_ransacked_brown_F",[11079.4,8466.79,0],[[0.792886,-0.609371,0],[0,0,1]]],
          ["Land_FoodSacks_01_small_brown_F",[11077.3,8470.54,0.815598],[[0.998695,-0.0510703,0],[0,0,1]]],
          ["Land_FoodSack_01_full_brown_F",[11077.3,8469.66,0.814713],[[0.984472,0.175543,0],[0,0,1]]],
          ["Land_LiquidDispenser_01_F",[11078.5,8467.7,0.960007],[[-0.0663435,-0.997797,0],[0,0,1]]],
          ["Land_MarketShelter_F",[11077.4,8474.25,0.479996],[[1,-4.37114e-008,0],[0,0,1]]]
    ];

    I have a class name, position and rotational data in it. What code would you use to grab the actual object with this, seeing that nearestObjects and TypeOf don't work? I suppose it would have to use the class name, but I don't know what the command would be.

     

    EDIT: isKindOf doesn't work either. It deletes the "normal" object but not the simple object.


  3. I actually have an array, but I tried testing this with:

    if (typeof _x == "Land_WoodenCounter_01_F") then {deleteVehicle _x};

    That will delete "normal" objects, including objects that are hand-placed in the editor, but it doesn't recognize simple objects.

     

    I don't know of another way to use an array to get a handle on a group of objects. Wouldn't you need to create an individual pointer or variable name for each object?


  4. Hi, I have a problem deleting simple objects.

     

    I spawn a number of simple and "normal" objects in a 150m radius using this code:

    //simple object
    _thisObject = createSimpleObject [_thisClass, _thisPos, true];
    
    //normal object
    _thisObject = createVehicle [_thisClass, _thisPos, [], 0, "CAN_COLLIDE"];

    But when I try to delete those objects with this code, it only deletes the "normal" objects:

    {deleteVehicle _x} forEach nearestObjects [_centerPos, ["all"], 150];

    It turns out, nearestObjects only locates the "normal" objects, not the simple objects spawned in with createSimpleObject.

     

    The wiki says that simple objects can be deleted with deleteVehicle, but how do I get a handle on a group of them within a specific radius in order to use that command? Is there some equivalent to nearestObjects for simple objects?


  5. In DayZ, my autorun mod was a nickel wedged into the "w" key to hold it down. True story.

     

    Also... O! Captain, my captain (Haleks), do you have a release date for RVG 2.0? Not a big deal, I'm just working on something that should be ready in 4-6 weeks, and I'm wondering if I should wait to release in 2.0. Unless the date is a secret.

    • Haha 1

  6. Thanks. Somewhere above this code, I was using BIS_fnc_objectsMapper to spawn in a composition, and even though I could see all the objects spawned in, apparently there is something that goes on in the background and the composition takes a few seconds to fully "initialize".

     

    I moved my code down a bit and put a sleep 5; in front of it, and now it works.


  7. I'm trying to get a handle on a specific object and am having some trouble. My code is looking for "Land_MarketShelter_F" within a specific radius.

     

    isKindOf says the market shelter is a "Building", and if I type in the debug console -

    copyToClipboard str nearestObjects [_thisAnchorPos, ["building"], 200];

    ...I can see "Land_MarketShelter_F" in the array. But when I use this code in my script -

        _thisShelter = nearestObjects [_thisAnchorPos, ["building"], 200];
        {
          if (typeOf _x == "Land_MarketShelter_F") then { [_x] call BIS_fnc_replaceWithSimpleObject; };
        } forEach _thisShelter;

    ...it's not in the array. In fact, that last bit of code returns a much smaller array of objects.

     

    It doesn't help that isKindOf says the market shelter is a "Building", but  BIS_fnc_objectType says it's a "House".

     

    Anyone know what I'm doing wrong?


  8. Ok I'm getting this now. I'm building a kind of "quest-based" system for a map I'm working on, and it looks like the mission namespace might be a good place to organize and store "quest" states. I just figured out how to implement "function libraries" 🙂 so I can figure this out. I'll test it today.

     

    I have one last simpleminded question, which is at the heart of why I'm confused about this (apologies if it was explained above, I'm dense) - why would you use setVariable in missionNamespace instead of just setting a global variable? What is the benefit of it? It seems like it's about localization. I'm guessing using namespace keeps things more organized as well.

     

    Thanks!


  9. I just launched the mission I've been working on, and am finding that occasionally, the fog (which is dense) just switches off. One second it's thick pea soup, and the next it's just gone.

     

    Has anyone else seen this? Is there a workaround? I've tried setting the fog in the Environment setting in Eden, as well as playing with setFog and BIS_fnc_setFog, to no avail.

     

    Thanks. 


  10. This went through beta testing, but as always feel free to post any issues or questions if you have them. You can post either here or on Steam. Thanks!

     

    Known Issues

    • Rarely on saved game content, the fade in/fade out doesn't fire at the end of missions. I've seen this before on other missions, and I have no idea what causes it, but it won't effect gameplay.
    • Sometimes the fog just "switches off" during the boss fight. Again, no idea why, I'm working on it, but it won't effect gameplay.

  11. 3 hours ago, haleks said:

    I'm probably going to hide the old modules as the new ones roll out : the old ones would be absent from 3den unless you are opening an old mission where there're present already.

     

    That sounds like a good plan. Personally, I don't care about the old modules if new ones are coming in. Pretty excited to see what they are.


  12. EDIT: I figured it out. There was a sleep statement that used _timSec below the exitWith, I just moved it above it. Thanks!

     

    I have a piece of code that spawns an enemy a certain amount of times, with a delay between each (basically a scripted trigger), like this -

      while {HJ_TIMER} do
      {
        _timSec = random [120,150,180];
    	//some code
      };

    The problem with this is that when the task is over and the player moves to the next task, if the counter already initiated it spawns an enemy into the new task in 120 - 180 secs.

     

    So I added an exitWith, and set HJ_TIMER to false at the end of the original task -

      while {HJ_TIMER} do
      {
        _timSec = random [120,150,180];
        if (HJ_TIMER == false) exitWith {};
    	//some code
      };

    My thought was that even though the timer was counting down, it wouldn't get past the exitWith. Problem is, it still is getting past it, and spawning an enemy in the new task.

     

    Am I using exitWith correctly? Is there a better way to exit this loop? Thanks in advance.


  13. Escape from Argo : : An ARMA Cyberpunk RPG

    img1.jpg

     

    By 2128, the Mediterranean Sea has receded. Changes in temperature and weather patterns have left the

    planet covered in a thick chemical haze, subject only to the buffeting of constant electrical storms. Law

    and order has broken down across the remaining civilized regions, and the global crime rate has risen 400%.

    The once-great city of Argo has become the one maximum security prison for the entire Mediterranean region.

    A wall has been erected around the city, and the perimeter has been mined. While there is little direct contact

    with the prisoners, elite units of the MED REGION Police Force are occasionally ordered into the prison on

    special assignment.

    This is a standalone game inspired by 80's and 90's-era cyberpunk games and movies.


    Escape From Argo on Steam

     

    Features

     

    You are a member of an elite unit of the MED REGION Police Force, tasked with performing special operations

    inside the Argo Maximum Security Prison.

     

    You'll be assigned three missions, culminating in a fight to the death with one of the prison warlords.

     

    Missions are highly randomized, so no two games will be the same.

     

    After each successful mission, you'll be promoted and allowed to train a skill. You'll also be provided

    with a better weapon.

     

    Be advised, the prisoners will advance in skill as well.

     

    If you take too long to complete a mission and escape the prison, the prisoners will discover your presence

    and sound an alarm. Every time you hear the alarm, a new group of enemies will set out to hunt you down.

     

    Your gear will include a few chemlights. Argo is a relatively big city, so try to leave a trail if you get lost easily.

     

    img2.jpg

     

    map.jpg

     

     

     

     

    • Like 3

  14. Here's another piece of info - these agents are spawned in as "CIV" NPCs. The actual enemy units that are spawned in are cleared with:

    {deleteVehicle _x; sleep 0.01;} foreach (allunits select {side _x == opfor});

    For the agents, I use:

    { deleteVehicle agent _x } forEach agents;

    Units are cleared, agents remain on the map as (in Spectator Mode) as those AI markers.

     

    Perhaps I shouldn't be worried, because those markers don't take up processing power? It seems like they would, as they remain in memory in some way.


  15. I've got my dialogs running now, save for one item.

     

    To set the text of a button, I can use...

    ctrlSetText [idc, text]

    ...but to set the tooltip, I have to use something entirely different...

    control ctrlSetTooltip text

    So how do I get a handle on the control? Is it _control = display displayCtrl idc? It seems odd to call displayCtrl when the controls are already displayed as per the class I created.

     

×