Jump to content

[1.4.1] Snap Building PRO


Recommended Posts

Previous message was not that clear what was related to what...

 

I placed 1 object down and tried to snap a 2nd object to it with out re logging and this is what the gizmo output was

 

 

Gizmo = [5.625,3.125,0], Object = 35338100# 982953: cinder_wall_half.p3d

 

After logging to the lobby and rejoining and trying to snap a 2nd object to the first it said this

 

 

Gizmo = [0.625,0.625,0], Object = 34791d00# 982614: cinder_Wall_half.p3d REMOTE

 

 

Due to the differences here i decided to check the the database info for the item using infistar admin panel both before logging to lobby and after. apart from a very minor change to the angle (.829 - .83) the rest of the info was identical.

Link to comment
Share on other sites

oops, gave you wrong second part of systemchat, I meant to check coords, not the object itself.

systemchat format ["Gizmo = %1, Object = %2",(getPosATL _objectSnapGizmo), (getPosATL _nearbyObject)]; 

Does not matter tho. Seems like only one snap point managed to be teleported. I have honestly no idea what could cause this. All I see is snap points being stuck in same place.

Any chance that one of you could PM me your mission file? I can test it on local machine later today. Don't think I need server files for this tho.

 

Just out of curiosity you guys are running steam beta and 1051, right?

Link to comment
Share on other sites

is any one else unable to build on the oil rigs on tavi? items build but when interacted with they disappear eg. i can place a safe but if i open the safe it disappears, any item built also vanishes after server restart

It's not SBP related. The fact that you can build stuff there means it works. Truth is rather different, Arma uses different methods to get and set positions, based on terrain, objects underneath player or water level (wave height in A3, too). Problem with this is that epoch was not designed for water bases and only utilizes terrain level. Your stuff does not dissapear, it is spawned in wrong location, probably under water. The moment you open or close the safe, down it goes lol.

Ironically enough epoch compiles comes with solution by default, just that it is not used properly (or not used at all). The same function, funny enough, while takes extra few lines of code, is actually faster than traditional solution.

 

Long story short, you'd need to replace all ATL entries within a mod with FNC_GetPos function, growing your mission file size.

These things should be addressed in github, tbh and integrated into a mod by default. 

Link to comment
Share on other sites

OK, I'm at a loss at this point.  I have been unable to get the "F" key to read properly from dayz_spacInterrupt into the game to actually allow the player to engage the snap of the items.  Nothing happens and no errors in the RPT.
 
Here's some info:
Compiles

http://pastebin.com/HdDbVqCS

 

dayz_spaceInterrupt

http://pastebin.com/HAppa49F

 

I apologize for the poor post formatting.  Currently on a tablet and it is not agreeing with the forum interface.

 

The space interrupt file is the snappro variant, with our group management key added in.  That key also does not work for its intended function, I would guess they both suffer the same issue.  I cannot say for certainty that any of this interrupt is working A-OK, but I would think the problem would be in the compiles file.

 

I'd appreciate if someone could take a look at these and help me out with finding the flaw.  Thanks!

 

Apoc

Link to comment
Share on other sites

Apoc

Hai,

 

Noticed you are using different path for player_build:

        player_build = compile preprocessFileLineNumbers "custom\player_build.sqf";
        snap_build = compile preprocessFileLineNumbers "custom\snap_pro\snap_build.sqf";

Any particular reason? Merging with other mods or wrong file?

Spaceinterrupt file seems to be fine, are you getting snap actions at all? If you do, you are most likely using merged player_build that does not appear to have DZE_F toggles.

 

If you are using modified player_build, post me your file and let me know what mods are used

 

Regards

Kind

Ray

Link to comment
Share on other sites

Everything looks fine, weird tho. Can you make sure that none of those scripts are precompiling spaceinterrupt outside of compiles file?

Notepad++ lets you open multiple files and search trough it for you. Might as well pop open every single sqf file in your mpmissions. (*.sqf in search bar)

Link to comment
Share on other sites

jeah well tried that but didn't work, it just drops the object where i left it but it doesnt snap - probably because im using the merged version with plot for life

Link to comment
Share on other sites

Back from work now, can test these things till monday morning. Mathew sent me his NAPF server files already, i'll see if I can assist you somehow. Quite honestly I don't even run other scripts that reuses player build on my own server, not even merged ones, so never had a chance to study them

Link to comment
Share on other sites

Alright fixed. Will be pushing out new update, for those who don't want to wait:

snap_building.sqf replace whole function with this:

fnc_initSnapPointsNearby = {
	_pos = [_object] call FNC_GetPos;
	_findWhitelisted = []; _pointsNearby = [];
	_findWhitelisted = nearestObjects [_pos,_whitelist,(_radius + DZE_snapExtraRange)]-[_object];
	snapGizmosNearby = [];	
	{	
		_nearbyObject = _x;
		_pointsNearby = getArray (missionConfigFile >> "SnapBuilding" >> (typeOf _x) >> "points");
		{
			_objectSnapGizmo = "Sign_sphere10cm_EP1" createVehicleLocal [0,0,0];
			_objectSnapGizmo setobjecttexture [0,_objColorInactive];
			_objectSnapGizmo setDir (getDir _nearbyObject);
			_posNearby = _nearbyObject modelToWorld [_x select 0,_x select 1,_x select 2];
			if (surfaceIsWater _posNearby) then {
				_objectSnapGizmo setPosASL [(_posNearby) select 0,(_posNearby) select 1,(getPosASL _nearbyObject select 2) + (_x select 2)];
			} else {
				_objectSnapGizmo setPosATL _posNearby;
			};
			snapGizmosNearby set [count snapGizmosNearby,_objectSnapGizmo];
		} count _pointsNearby;
	} forEach _findWhitelisted;
};

It is quite weird how you fight between 2 different limitations just to get this to work. Seems like attaching caused problems when running merged scripts. I rolled back to old method for point creation while keeping new method for checking nearby.

Tested with deep water bases, seems to be working fine, restarted to double check and walls + upgraded wall were still there, so should be fine.

Tested on NAPF mission Mathew sent me, he had problems with snap points not showing up immediately, they would if client was restarted. Works now, but i am still puzzled as to what caused that... definitely one of other mods using player build, probably conversions between ATL and ASL

 

edit: actually I will wait till tomorrow to see if any more problems arises. Would be nice if someone could confirm that everything works incl water bases with this fix. It works for me, but that's apparently not good enough :P

Link to comment
Share on other sites

I can confirm it looks like its all working fine on land. I tried to build in the sea but couldnt get my gear to open as was swimming so not sure how to do that lol

ahh, just build a small bridge or something, it will count as water.

For deep water base tests I simply added supermarket in middle of ocean, lol ...(server pbo, cherno)

 

watertest.sqf

if (isServer) then {
	_vehicle_0 = objNull;
	if (true) then
	{
	  _this = createVehicle ["MAP_A_GeneralStore_01", [15365.4, 1684.8723, -0.046695411], [], 0, "CAN_COLLIDE"];
	  _vehicle_0 = _this;
	  _this setDir 43.178959;
	  _this setPos [15365.4, 1684.8723, -0.046695411];
	};
};

bottom of server_functions.sqf

[] ExecVM "\z\addons\dayz_server\waterTest.sqf";
Link to comment
Share on other sites

Real nice job with Snap Building Pro, raymix. Been using it for a while now and thought I'd take the opportunity and say some nice words about it :) . The only issue I had with it was that the objects (metal floors mostly) wouldn't line up perfectly, occasionally leaving gaps in between. But I see you've now fixed it with the latest update which makes it the perfect tool for an avid base builder :) . Nice job indeed, keep it up.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
×
×
  • Create New...