-
Notifications
You must be signed in to change notification settings - Fork 739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raise lower carry object #5234
Raise lower carry object #5234
Conversation
This has some problems with being able to scroll the item below ground and breaks on objects manually set with But it shows that the real problem is
|
Is that code tested on dedicated? Dosent work at all. The item just disappears. And putting it to low is something i also noticed but it will be put on the ground not in it. Dont see what breaks in setCarryable that I changed :/ but also i'm learning so |
// Set to default value | ||
private _parentConfig = [_target] call CBA_fnc_getObjectConfig; | ||
private _defaultPos = getArray(_parentConfig >> QGVAR(carryPosition)); | ||
_target setVariable [QGVAR(carryPosition), _defaultPos, true]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks ace_dragging_fnc_setCarryable
because the object has no config, so it stores []
df147b8 |
Sorry. I didnt clean all the lines of code. So forgot to change back to the original _position declaration. |
Still real new to the 100 different ways of taking out a position and what space it is in when you take it out. |
I know your pain 😄 |
One day you'll think you've grasped it all, just to realize you aren't even close. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice solution. I'd also like a comment above this block why setPosATL
or something else is not used, as to someone reading this code it might be very confusing why take this approach.
@@ -37,8 +37,10 @@ _position set [2, ((_position select 2) + _scrollAmount min (_maxHeight + 1.5)) | |||
|
|||
// move up/down object and reattach at current position | |||
detach _carriedItem; | |||
_carriedItem setPosATL _position; | |||
_carriedItem attachTo [_unit]; | |||
private _positionChange = _position vectorDiff (getPosATL _carriedItem); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 spaces on the right side of =
.
@@ -37,7 +37,9 @@ _position set [2, ((_position select 2) + _scrollAmount min (_maxHeight + 1.5)) | |||
|
|||
// move up/down object and reattach at current position | |||
detach _carriedItem; | |||
private _positionChange = _position vectorDiff (getPosATL _carriedItem); | |||
|
|||
// Uses this method of selecting position because setATL dosen't work on dedicated server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't
That's not entirely true though, it only doesn't work correctly when object is not local, if I understood the core issue correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tha is true sorry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setPosATL
does work on remote objects, but from what I saw it didn't have immediate effects
At least in the same frame:
x setPosATL y;
(getPosATL x) != y
When merged this pull request will: