Jump to content

Fiddi

Member
  • Content Count

    241
  • Joined

  • Last visited

  • Medals

Posts posted by Fiddi


  1. 59 minutes ago, whiztler said:

    it usually helps when people post their code...

     

    There is no code. Everything is in the editor.

     

    37 minutes ago, beno_83au said:

    Try lock to prevent anyone getting out until you want them to, and setCurrentWaypoint for the waypoint issue. Both of these can be easily used within the editor from trigger and waypoint activations. 

     

    Does lock really work with AI? I've had AI entering locked vehicles before, but I'll give a try. I found out that if I deleted the two who exited it was business as usual, but then, of course, it was too easy. (Always something, haha!)

     

    I know about setCurrentWaypoint, was just wondering if there was another way inside the editor itself. I've tried syncing all the groups waypoints before the seek and destroy and that did nothing, I was hoping to make my mission with as little (self made or otherwise) scripts and functions as possible but still maintain a nice dynamic.

     

    Thanks for the help, though!


  2. Hey,

     

    I'm having some weird issues with a helicopter full of AI (all in the same group incl. pilot) in cargo.

    They have a Hold waypoint with trigger activation, a move, get out and seek and destroy. Waypoints works but there's always two AI that gets out during the hold waypoint before it has been activated by the trigger, as in the pilot lands the helicopter and they get out and the helicopter takes off again to original position. It's a Hellcat with full cargo of FIA soldiers (6). I can't figure out what drives them to such weirdness, usually I have a relatively good grasp of the AI but this is just... I can't even..

     

    Also, is there a way to make a patrolling unit skip all their move waypoints before a Cycle and go to a waypoint (seek and destroy) after the cycle, in the editor?

     

    Thanks!


  3. 21 hours ago, AZCoder said:

    Not much can be done about AI drivers mowing down pedestrians, that's an Arma thing. Bohemia forgot to issue the AI drivers licenses.

     

    You can give the "bystanders" an event handler that disables the damage from certain vehicles. They still get run over, it's just that they won't die or take any damage from them. (May need some rewriting to fit specific needs, right now it's just for drivers from the same side.)

     

    	_unit addEventHandler ["HandleDamage", {
    		_unit = _this select 0;
    		_driver = _this select 3;
    		if (vehicle _driver != _driver AND side _driver == side _unit) then {
    			0
    		} else {
    			_this select 2
    		}
    	}];

     

    • Thanks 1

  4. Hello,

     

    I was wondering exactly what is saved when using the existing save function on missions. I get that units, vehicles and stuff that is placed inside the editor is saved and such, but are variables in the init.sqf saved? How about dead bodies and destroyed vehicles?

     

    Are there any event handlers for when the game is saved and loaded?

     

    I'm trying to design my mission with as few external scripts and functions as possible, mainly because I want to be able to use the vanilla save and load. But I need to know what kind of limitations I will be encountering.

     

    Thanks!


  5. 3 hours ago, HazJ said:

    For the GPS:

    
    miniMapEH = ((uiNamespace getVariable "RscCustomInfoMiniMap") displayCtrl 101) ctrlAddEventHandler ["Draw", client_fnc_playerMarkers];

    Where do you run your code?

     

    Thanks for the code!

     

    I'm executing it on the players init field inside the editor. But I've tried initServer.sqf and initPlayerLocal.sqf


  6. Hi, I'm having problems figuring out what I'm doing wrong with the command drawIcon. It works in singleplayer and the icon shows up on the map, but in multiplayer it doesn't. It's supposed to be displayed on both the GPS-minimap and the regular map screen.

     

    Here's the code I've got so far. It's executed on the init of the unit (fredrik) in question.

    ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", {
    	(_this select 0) drawIcon [
    		"iconManMedic",
    		[0,0,1,1],
    		(getPosWorld fredrik),
    		0.5 / ctrlMapScale (_this select 0),
    		0.5 / ctrlMapScale (_this select 0),
    		getDir fredrik,
    		(name fredrik)
    	];
    }];

     

    Any kind of clarification on how to get it to show up on the GPS and in multiplayer would be appreciated!

    Thanks!


  7. I don't know why they didn't make the "Edit terrain objects" module work in multiplayer.

     

    I have a similar problem, I can see destroyed buildings that I've made with the module but everyone else see both the destroyed building and the undamaged one, and they are flickering and occupy the exact same place. Also AI shoot through the undamaged building and kill the client players inside.


  8. 58 minutes ago, sarogahtyp said:

    *snip*

     

    Thanks, that helped. I didn't know about lineIntersects before.

    I tailored your functions to my own needs (It didn't work at first since lineIntersects specifically need ASL pos and buildingPos outputs AGL)

    Came up with this:

    _spawnPos = selectRandom ((_building buildingPos -1) select {lineIntersects [AGLToASL _x, (AGLToASL _x) vectorAdd [0,0,10]]});

    That works with the building with the highest roof in Altis (the ghost hotel foyer, I think).

     

    Though I ended up keeping my original manual solution, since there were a few buildings with positions that were indoors I didn't want to spawn in. However since that is solved we can keep it here for the archives, in case anyone else needs it.

     

    Thanks again!

    • Like 1

  9. 2 hours ago, pierremgi said:

     

    Not for me!  It's one of my first attempt! It works from time to time and surely fails if you create a loop for lifting / dropping / lifting / dropping...  the same container. No possible noria.

    The only way have found is to land "get in" and setSlingLoad , with some cautions of course.

     

    Okay, I can only speak for myself and have had helicopters pick up stuff in many cases, this might help, you can try it in any case:

    _Pilot setSkill 1;
    _Pilot setBehaviour "SAFE";
    _Pilot disableAI "AUTOCOMBAT";
    _Pilot disableAI "CHECKVISIBLE";

    I can add that when I first started with the AI slingload, they wouldn't pick up or drop off crates either, but then something clicked and it started working flawlessly, and I don't remember quite what it was I did.


  10. 1 hour ago, pierremgi said:

    The scripted "hook" waypoint or the equivalent "Lift cargo" in editor breaks for some weird reasons. I spent hours, testing without enemy units or harsh environment, on air field or invisible helipad or on bare ground. I tested with and without waypointAttachVehicle and much more ways:

     

    This waypoint works sometimes and fails most of the time, the helicopter jingling around the position. I didn't find any solution to make a rotation pattern with hook unhook sequence on the same load (at different places of course). Too fragile feature.

     

    I have had great success with this, with it working all the time.

    _Waypoint = _Group addWaypoint [_container, 0];
    _Waypoint setWaypointType "HOOK";
    _Waypoint waypointAttachVehicle _container;

  11. Hello,

    Would like to get some optimization tips for this loop I have. It gives the enemy sides the possibility of reporting all enemy activity to their friends. It has already intensified my mission greatly, and I was wondering if there's something I can improve upon, as I would guess it's a bit of a performance hog.

     

    Anyway, here's the code:

    while {true} do {
    	_allGroups = allGroups select {!(leader _x getVariable ["excludeZeus", false])};
    	{
    		_group = _x;
    		_allUnits = allUnits select {(side _group) != (side _x) AND (side _group) knowsAbout _x > 1};
    		{
    			_group reveal [_x, 1.6];
    			Sleep 1;
    			true
    		} count _allUnits;
    		true
    	} count _allGroups;
    	Sleep random [2, 4, 8];
    };

     


  12. On 2/11/2017 at 8:03 PM, Electricleash said:

     

    Same goes for the Strider. Seems to be only in the EDEN Garage though, as you can still access the extra paint-jobs from the Virtual Garage in the main menu.

    Way around it at the moment is to save them as a 'loadout' there, then load them back in when in the EDEN Garage.

    Does seem to be an oversight though.

     

    What I've been able to figure out is that is has to do with the " factions[] " Array inside "class textureSources" of each vehicle. Meaning that, for example, the strider which is a AAF vehicle doesn't show the Nato factions texture. If you empty that array so that is has no faction attached it works as it should. Hope that makes sense.

    • Like 1

  13. I play my mission with my friend, and we're getting fairly good performance.

     

    We do want to amp up our mission with more going on at the same time but are cautious with the performance impact. Right now my computer handles all the AI, which I presume brings down performance on both of our computers (feel free to correct me). 

     

    So the question is, if I code it in a way that evenly splits the AI between us will it increase overall performance?

    • Like 1

  14. Hello,

     

    I've come across the most bizarre problem I've encountered yet in a building put together in the editor. From a distance my lights look like they should but when you approach it becomes almost pitch black even when standing in the middle of the lit area. It's the same whether it's one or several lights. Any ideas to resolve or circumvent this weirdness are greatly appreciated.

     

    This is how it's supposed to look:

    78C22D2F5DF2A5FC7B56A9E616DFE6485922E61F

     

    This is how it looks when standing in the middle of the building:

    17BEFD252BD1DF99663E834D2DDCC7E399D87860

     

×